* fix icon names (they have been updated in kdelibs)
[kdenetwork.git] / CMakeLists.txt
blob731d5b6b7a6f565437935eb4debe3b3225e2b73d
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(QCA2)
33 find_package(JPEG)
34 find_package(X11VidMode)
35 find_package(Decibel)
36 find_package(IDN)
37 find_package(Plasma)
38 find_package(LibVNCServer)
40 macro_optional_find_package(DNSSD)
41 macro_optional_find_package(SLP)
42 macro_optional_find_package(IDN)
43 macro_optional_find_package(LibVNCServer)
45 macro_log_feature(LIBVNCSERVER_FOUND   "libvncserver" "VNC Server lib, needed to build krfb"       "http://libvncserver.sourceforge.net/")
46 macro_log_feature(DNSSD_FOUND   "libdnssd" "Support for Zeroconf, needed to build dnssd"       "http://www.zeroconf.org")
47 macro_log_feature(QCA2_FOUND    "libqca2"  "Qca2 is needed to build some parts of kopete"              "Module into kdesupport" FALSE "2.0")
48 macro_log_feature(SLP_FOUND     "openslp"  "OpenSLP is needed to build krdc and krfb"         "http://www.openslp.org/")
49 macro_log_feature(DECIBEL_FOUND "Decibel"  "Decibel is the KDE framework for real-time communication" "HOWTO in kopete/protocols/telepathy")
50 macro_log_feature(IDN_FOUND   "libidn" "libidn provides International Domain Name Support for Kopete's Jabber plugin"       "http://www.gnu.org/software/libidn")
51 macro_log_feature(PLASMA_FOUND "Plasma" "Plasma is a really cool replacement for kicker, needed for KNewsTicker" "Part of kdebase")
53 macro_bool_to_01(SLP_FOUND HAVE_SLP) # for both krfb and krdc
55 add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
56 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
58 macro_optional_add_subdirectory(doc)
59 macro_optional_add_subdirectory(kfile-plugins)
60 macro_optional_add_subdirectory(lanbrowsing)
61 macro_optional_add_subdirectory(kget)
63 if(Q_WS_X11)
65   if(PLASMA_FOUND)
66     macro_optional_add_subdirectory(knewsticker)
67   endif(PLASMA_FOUND)
69   macro_optional_add_subdirectory(kppp)
71   if(JPEG_FOUND AND SLP_FOUND)
73     if(X11VIDMODE_FOUND)
74        macro_optional_add_subdirectory(krdc)
75     endif(X11VIDMODE_FOUND)
77   endif(JPEG_FOUND AND SLP_FOUND)
79   if(LIBVNCSERVER_FOUND AND SLP_FOUND)
80     macro_optional_add_subdirectory(krfb)
81   endif(LIBVNCSERVER_FOUND AND SLP_FOUND)
83 endif(Q_WS_X11)
85 if (DNSSD_FOUND)
86    macro_optional_add_subdirectory(kdnssd)
87 endif (DNSSD_FOUND)
89 macro_optional_add_subdirectory(kopete)
91 if(NOT WIN32)
92   macro_optional_add_subdirectory(filesharing)
93 endif(NOT WIN32)
95 macro_display_feature_log()