Workaround for g++ v3.x parser error.
[kdenetwork.git] / CMakeLists.txt
blob8f2fe49917b52929bda6b8d2b25a86f53f4a7656
1 project(kdenetwork)
3 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
5 # search packages used by KDE
6 find_package(KDE4 REQUIRED)
7 include (KDE4Defaults)
8 include (MacroLibrary)
10 include(CheckIncludeFile)
11 include(CheckIncludeFiles)
12 include(CheckSymbolExists)
13 include(CheckFunctionExists)
14 include(CheckLibraryExists)
15 include(CheckPrototypeExists)
16 include(CheckTypeSize)
17 include(MacroBoolTo01)
18 include(MacroOptionalAddSubdirectory)
20 # If definitions like -D_GNU_SOURCE are needed for these checks they
21 # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
22 # defined outside this file.  Here we include these definitions in
23 # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
24 # checks below.
25 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
26 if (WIN32)
27    set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} )
28    set(CMAKE_REQUIRED_INCLUDES  ${KDEWIN32_INCLUDES} )
29 endif (WIN32)
31 find_package(KdepimLibs REQUIRED)
32 find_package(Boost REQUIRED )
33 # find_package(X11VidMode) not used at this time
35 macro_optional_find_package(LibVNCServer)
36 macro_log_feature(LIBVNCSERVER_FOUND "libvncserver" "VNC Server library" "http://libvncserver.sourceforge.net/" FALSE "0.9" "Needed to build Krfb and VNC support in Krdc")
38 macro_optional_find_package(JPEG)
39 macro_log_feature(JPEG_FOUND "libjpeg" "Development library for JPEG formatted image files" "http://www.ijg.org/" FALSE "" "Provides JPEG images in Krdc.")
41 macro_optional_find_package(DNSSD)
42 macro_log_feature(DNSSD_FOUND "mDNS" "Zeroconf compatible runtime libraries" "http://www.zeroconf.org" FALSE "" "Needed for KDE's service discovery feature Krfb and Krdc and the dnssd ioslave.")
44 macro_optional_find_package(QCA2)
45 macro_log_feature(QCA2_FOUND "QCA" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Needed to build Kopete's GroupWise and Jabber protocols.")
47 macro_optional_find_package(SLP)
48 macro_log_feature(SLP_FOUND "OpenSLP" "SLP (Service Location Protocol) implementation" "http://www.openslp.org/" FALSE "" "Provides SLP support in Krfb.")
50 macro_optional_find_package(Decibel)
51 macro_log_feature(DECIBEL_FOUND "Decibel"  "KDE framework for real-time communication" "http://decibel.kde.org/" FALSE "" "Used by the Kopete telepathy protocol.")
52 macro_optional_find_package(IDN)
53 macro_log_feature(IDN_FOUND "IDN" "GNU Libidn Internationalized Domain Name (IDN) implemenation" "http://www.gnu.org/software/libidn/" FALSE "" "Used by Kopete's Jabber plugin.")
55 #the statisticsdb plugin should be rewritten to use the QSqlFoo classes
56 macro_optional_find_package(Sqlite)
57 macro_log_feature(SQLITE_FOUND "Sqlite" "Embeddable SQL engine" "http://www.sqlite.org" FALSE "" "Provides the database storage for Kopete's Statistics plugin.")
59 macro_optional_find_package(Plasma)
60 macro_log_feature(PLASMA_FOUND "Plasma" "Plasma libraries and header files" "http://plasma.kde.org/" FALSE "" "Plasma is needed for KNewsTicker and the Plasma applet of KGet. Install kdebase-workspace.")
63 macro_bool_to_01(SLP_FOUND HAVE_SLP) # for krfb
65 add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
66 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
68 macro_optional_add_subdirectory(doc)
69 macro_optional_add_subdirectory(kfile-plugins)
70 macro_optional_add_subdirectory(kget)
71 macro_optional_add_subdirectory(kopete)
72 macro_optional_add_subdirectory(krdc)
73 macro_optional_add_subdirectory(lanbrowsing)
75 if(Q_WS_X11)
76   macro_optional_add_subdirectory(kppp)
78   if(LIBVNCSERVER_FOUND AND SLP_FOUND)
79     macro_optional_add_subdirectory(krfb)
80   endif(LIBVNCSERVER_FOUND AND SLP_FOUND)
81 endif(Q_WS_X11)
83 if(PLASMA_FOUND)
84     macro_optional_add_subdirectory(knewsticker)
85 endif(PLASMA_FOUND)
87 if (DNSSD_FOUND)
88    macro_optional_add_subdirectory(kdnssd)
89 endif (DNSSD_FOUND)
91 if(NOT WIN32)
92   macro_optional_add_subdirectory(filesharing)
93 endif(NOT WIN32)
95 macro_display_feature_log()