CMakeLists.txt 2.95 KB
Newer Older
1
kde4_header()
Laurent Montel's avatar
Laurent Montel committed
2
project(libkcddb)
3

4
5
add_subdirectory( test )
add_subdirectory( kcmcddb )
Laurent Montel's avatar
Laurent Montel committed
6

7
macro_optional_find_package(MusicBrainz)
Laurent Montel's avatar
Laurent Montel committed
8
9

if(MUSICBRAINZ_FOUND)
10
11
12
13
14
    set(HAVE_MUSICBRAINZ 1)
    set(libmusicbrainz_SRCS ${libmusicbrainz_SRCS} musicbrainz/musicbrainzlookup.cpp musicbrainz/sha1.c)
else(MUSICBRAINZ_FOUND)
    set(HAVE_MUSICBRAINZ 0)
    set(libmusicbrainz_SRCS)
Laurent Montel's avatar
Laurent Montel committed
15
endif(MUSICBRAINZ_FOUND)
16

17
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-musicbrainz.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-musicbrainz.h )
18

19
include_directories(${CMAKE_BINARY_DIR}/libkcddb/ )
20
21
22
23


########### next target ###############

Laurent Montel's avatar
Laurent Montel committed
24
set(kcddb_LIB_SRCS ${libmusicbrainz_SRCS}
25
26
   cache.cpp 
   cdinfo.cpp 
27
   kcddbconfig.cpp 
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
   client.cpp 
   cddb.cpp 
   lookup.cpp 
   cddbplookup.cpp 
   synccddbplookup.cpp 
   asynccddbplookup.cpp 
   httplookup.cpp 
   synchttplookup.cpp 
   asynchttplookup.cpp 
   smtpsubmit.cpp 
   asyncsmtpsubmit.cpp 
   syncsmtpsubmit.cpp 
   submit.cpp 
   sites.cpp 
   httpsubmit.cpp 
   asynchttpsubmit.cpp 
   synchttpsubmit.cpp 
   categories.cpp 
   genres.cpp 
   cdinfodialog.cpp 
   cdinfoencodingwidget.cpp )

kde4_automoc(${kcddb_LIB_SRCS})

52
kde4_add_ui_files(kcddb_LIB_SRCS cdinfodialog.ui cdinfoencodingwidget.ui )
53
54
55
56
57

kde4_add_kcfg_files(kcddb_LIB_SRCS configbase.kcfgc )

kde4_add_library(kcddb SHARED ${kcddb_LIB_SRCS})

58
59
60
61
target_link_libraries(kcddb ${KDE4_KDE3SUPPORT_LIBS})
if(MUSICBRAINZ_FOUND)
    target_link_libraries(kcddb musicbrainz)
endif(MUSICBRAINZ_FOUND)
62
63
64
65
66
67
68

set_target_properties(kcddb PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install_targets(${LIB_INSTALL_DIR} kcddb )


########### install files ###############

69
install_files( /include/libkcddb FILES cdinfo.h client.h kcddbconfig.h cddb.h configbase.h )
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
install_files( ${KCFG_INSTALL_DIR} FILES libkcddb.kcfg )

kde4_footer()



#original Makefile.am contents follow:

#if build_MB
#  MB_DIR = musicbrainz
#  mb_lib = $(top_builddir)/libkcddb/musicbrainz/libmusicbrainz.la
#endif
#
#
#
#SUBDIRS = $(MB_DIR) . test kcmcddb
#
#INCLUDES = -I$(srcdir)/.. $(all_includes)
#
#lib_LTLIBRARIES = libkcddb.la
#
#libkcddb_la_SOURCES = \
92
#    cache.cpp cdinfo.cpp kcddbconfig.cpp client.cpp cddb.cpp lookup.cpp \
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#    cddbplookup.cpp synccddbplookup.cpp asynccddbplookup.cpp httplookup.cpp \
#    synchttplookup.cpp asynchttplookup.cpp smtpsubmit.cpp \
#    asyncsmtpsubmit.cpp syncsmtpsubmit.cpp configbase.kcfgc \
#    submit.cpp sites.cpp httpsubmit.cpp asynchttpsubmit.cpp \
#    synchttpsubmit.cpp categories.cpp genres.cpp \
#    cdinfodialog.cpp cdinfodialogbase.ui cdinfoencodingwidget.cpp \
#    cdinfoencodingwidgetbase.ui
#
#libkcddb_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined
#libkcddb_la_LIBADD  = $(LIB_KDECORE) $(LIB_KIO) $(mb_lib)
#    
#
#METASOURCES = AUTO
#
#kde_kcfg_DATA = libkcddb.kcfg
#
#kcddbincludedir = $(includedir)/libkcddb
#kcddbinclude_HEADERS = \
111
#    cdinfo.h client.h kcddbconfig.h cddb.h configbase.h
112
113
114
115
#
#messages: rc.cpp
#	$(XGETTEXT) *.cpp -o $(podir)/libkcddb.pot
#
116
#kcddbconfig.lo: configbase.h