3 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
4 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
6 # search packages used by KDE
7 find_package(KDE4 REQUIRED)
10 include(MacroOptionalAddSubdirectory)
12 # the MACRO_OPTIONAL_DEPEND_PACKAGE from KDE4 is broken
13 MACRO (OUR_MACRO_OPTIONAL_DEPEND_PACKAGE _name _module_needed)
14 set(_packagename Find${_name}.cmake)
15 find_file(${_name}_PACKAGE_DEPEND_FOUND ${_packagename} PATHS ${CMAKE_MODULE_PATH} )
16 if(NOT ${_name}_PACKAGE_DEPEND_FOUND)
17 MESSAGE(STATUS "cmake package ${_packagename} was not found. The package ${_module_needed} is needed to compile all part of this program.")
18 set(DEPEND_PACKAGE_${_name} FALSE)
19 else(NOT ${_name}_PACKAGE_DEPEND_FOUND)
20 set(DEPEND_PACKAGE_${_name} TRUE)
21 endif(NOT ${_name}_PACKAGE_DEPEND_FOUND)
22 ENDMACRO (OUR_MACRO_OPTIONAL_DEPEND_PACKAGE)
25 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
26 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
28 macro_optional_find_package(OpenGL)
29 set(SOPRANO_MIN_VERSION "2.0")
30 macro_optional_find_package(Soprano)
31 macro_optional_find_package(Nepomuk)
32 macro_optional_find_package(KdepimLibs)
33 macro_optional_find_package(Phonon)
34 macro_optional_find_package(QScintilla)
37 set( OKULAR_FOUND "no" )
38 our_macro_optional_depend_package(Okular "Okular")
39 if(DEPEND_PACKAGE_Okular)
40 macro_optional_find_package(Okular)
41 endif(DEPEND_PACKAGE_Okular)
44 our_macro_optional_depend_package(Akonadi "Akonadi")
45 if(DEPEND_PACKAGE_Akonadi)
46 macro_optional_find_package(Akonadi)
47 endif(DEPEND_PACKAGE_Akonadi)
50 set( PLASMA_FOUND "no" )
51 macro_optional_find_package(Plasma)
54 set( KDEVPLATFORM_FOUND "no" )
55 OPTION(WITH_KDevPlatform "Search for KDevPlatform package" OFF)
56 our_macro_optional_depend_package(KDevPlatform "KDevPlatform")
57 if(DEPEND_PACKAGE_KDevPlatform)
58 macro_optional_find_package(KDevPlatform)
59 endif(DEPEND_PACKAGE_KDevPlatform)
61 macro_optional_add_subdirectory(smoke)
62 macro_optional_add_subdirectory(ruby)
63 macro_optional_add_subdirectory(python)
64 macro_optional_add_subdirectory(csharp)
65 macro_optional_add_subdirectory(java)
66 macro_optional_add_subdirectory(php)
68 macro_display_feature_log()