Bumpt version for RC2
[kdevelop:devel-kdevplatform.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 project(KDevPlatform)
4
5 set(KDE4_BUILD_TESTS "ON" CACHE "BOOL" "Enable building of tests" FORCE )
6
7 set(CMAKE_MODULE_PATH ${KDevPlatform_SOURCE_DIR}/cmake/modules)
8
9 set(KDEVPLATFORM_VERSION_MAJOR 0)
10 set(KDEVPLATFORM_VERSION_MINOR 10)
11 set(KDEVPLATFORM_VERSION_PATCH 1)
12
13 set(KDE_MIN_VERSION "4.3.0")
14 find_package(KDE4 4.3.0 REQUIRED)
15 find_package(ZLIB REQUIRED)
16
17 include (KDE4Defaults)
18 include (MacroWriteBasicCMakeVersionFile)
19 include (MacroLibrary)
20
21 set(KOMPARE_FOUND FALSE)
22 #macro_optional_find_package(Kompare)
23 macro_bool_to_01(KOMPARE_FOUND HAVE_KOMPARE)
24 #macro_log_feature(KOMPARE_FOUND "Kompare" "KPart to view file differences."
25 #                        "http://www.caffeinated.me.uk/kompare/" FALSE ""
26 #                        "Required for difference checking. From KDE SDK package, KDE 4.3.61 or higher needed.")
27 configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-kdevplatform.h.cmake
28                 ${CMAKE_CURRENT_BINARY_DIR}/config-kdevplatform.h )
29
30
31 add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
32
33 include_directories(${KDevPlatform_SOURCE_DIR} ${KDevPlatform_BINARY_DIR} ${KDE4_INCLUDES})
34
35 set(KDEVPLATFORM_LIB_VERSION 1.0.0)
36 set(KDEVPLATFORM_LIB_SOVERSION 1)
37
38 # Now set the usual KDEVPLATFORM_XXX_LIBRARIES variable so we can more easily move plugins around
39 set(KDEVPLATFORM_SUBLIME_LIBRARIES sublime)
40 set(KDEVPLATFORM_INTERFACES_LIBRARIES kdevplatforminterfaces)
41 set(KDEVPLATFORM_LANGUAGE_LIBRARIES kdevplatformlanguage)
42 set(KDEVPLATFORM_PROJECT_LIBRARIES kdevplatformproject)
43 set(KDEVPLATFORM_UTIL_LIBRARIES kdevplatformutil)
44 set(KDEVPLATFORM_OUTPUTVIEW_LIBRARIES kdevplatformoutputview)
45 set(KDEVPLATFORM_VCS_LIBRARIES kdevplatformvcs)
46 set(KDEVPLATFORM_SHELL_LIBRARIES kdevplatformshell)
47 set(KDEVPLATFORM_TESTS_LIBRARIES kdevplatformtests)
48 set(KDEVPLATFORM_DEBUGGER_LIBRARIES kdevplatformdebugger)
49
50 add_subdirectory(sublime)
51 add_subdirectory(interfaces)
52 add_subdirectory(project)
53 add_subdirectory(language)
54 add_subdirectory(shell)
55 add_subdirectory(util)
56 add_subdirectory(outputview)
57 add_subdirectory(vcs)
58 add_subdirectory(pics)
59 #macro_optional_add_subdirectory(doc)
60 add_subdirectory(debugger)
61 add_subdirectory(tests)
62
63 add_subdirectory(plugins)
64
65 macro_write_basic_cmake_version_file( ${KDevPlatform_BINARY_DIR}/KDevPlatformConfigVersion.cmake ${KDEVPLATFORM_VERSION_MAJOR} ${KDEVPLATFORM_VERSION_MINOR} ${KDEVPLATFORM_VERSION_PATCH} )
66 configure_file( "${KDevPlatform_SOURCE_DIR}/KDevPlatformConfig.cmake.in" "${KDevPlatform_BINARY_DIR}/KDevPlatformConfig.cmake" @ONLY )
67 configure_file( "${KDevPlatform_SOURCE_DIR}/kdevplatformversion.h.cmake" "${KDevPlatform_BINARY_DIR}/kdevplatformversion.h" @ONLY )
68
69 if(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
70     set(_kdevplatform_CONFIG_DEST "${LIB_INSTALL_DIR}/cmake/kdevplatform")
71 else(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
72     set(_kdevplatform_CONFIG_DEST "${LIB_INSTALL_DIR}/kdevplatform")
73 endif(KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
74
75 install( FILES
76         "${KDevPlatform_BINARY_DIR}/kdevplatformversion.h"
77         DESTINATION "${INCLUDE_INSTALL_DIR}/kdevplatform" )
78 install( FILES
79         "${KDevPlatform_BINARY_DIR}/KDevPlatformConfig.cmake"
80         "${KDevPlatform_BINARY_DIR}/KDevPlatformConfigVersion.cmake"
81         DESTINATION "${_kdevplatform_CONFIG_DEST}" )
82 install( EXPORT KDevPlatformTargets
83          DESTINATION "${_kdevplatform_CONFIG_DEST}"
84          NAMESPACE KDevPlatformImport__
85          FILE KDevPlatformTargets.cmake )
86
87 # Put this last, so it can use _kdevplatform_CONFIG_DEST
88 add_subdirectory(cmake)