* The construct_copy() function was using the full classname of the class
[kdebindings.git] / CMakeLists.txt
blob5eb2c4ebeeb30e1fab88989f9bc5848ae992f0d5
1 project(kdebindings)
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)
8 include(KDE4Defaults)
9 include(MacroLibrary)
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)
36 # Look for Okular
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)
43 # Look for Akonadi
44 our_macro_optional_depend_package(Akonadi "Akonadi")
45 if(DEPEND_PACKAGE_Akonadi)
46   macro_optional_find_package(Akonadi)
47 endif(DEPEND_PACKAGE_Akonadi)
49 # Look for KDevelop
50 set( KDEVPLATFORM_FOUND "no" )
51 OPTION(WITH_KDevPlatform "Search for KDevPlatform package" OFF)
52 our_macro_optional_depend_package(KDevPlatform "KDevPlatform")
53 if(DEPEND_PACKAGE_KDevPlatform)
54   macro_optional_find_package(KDevPlatform)
55 endif(DEPEND_PACKAGE_KDevPlatform)
57 macro_optional_add_subdirectory(smoke)
58 macro_optional_add_subdirectory(ruby)
59 macro_optional_add_subdirectory(python)
60 macro_optional_add_subdirectory(csharp)
61 macro_optional_add_subdirectory(java)
62 macro_optional_add_subdirectory(php)
63 macro_optional_add_subdirectory(falcon)
65 macro_display_feature_log()