diff --git a/CMakeLists.txt b/CMakeLists.txt index f73eafe244..524d4b3bee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,42 +1,43 @@ PROJECT(git) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${git_SOURCE_DIR}/cmake) find_package(KDE4 REQUIRED) find_package(KDevPlatform REQUIRED) include_directories( ${KDEVPLATFORM_INCLUDE_DIR} ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR}/threadweaver ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/duchain ${CMAKE_CURRENT_SOURCE_DIR}/parser ${CMAKE_CURRENT_BINARY_DIR}/parser ) add_definitions(-DKDE_DEFAULT_DEBUG_AREA=9525) add_subdirectory(tests) set(kdevgit_PART_SRCS gitplugin.cpp ) kde4_add_plugin(kdevgit ${kdevgit_PART_SRCS}) target_link_libraries(kdevgit ${KDE4_KDEUI_LIBS} ${KDEVPLATFORM_UTIL_LIBRARIES} ${KDEVPLATFORM_INTERFACES_LIBRARIES} ${KDEVPLATFORM_VCS_LIBRARIES} ${KDEVPLATFORM_PROJECT_LIBRARIES} ) install(TARGETS kdevgit DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### install files ############### install( FILES kdevgit.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES kdevgit.rc DESTINATION ${DATA_INSTALL_DIR}/kdevgit ) diff --git a/cmake/FindKDevPlatform.cmake b/cmake/FindKDevPlatform.cmake new file mode 100644 index 0000000000..1a771c5251 --- /dev/null +++ b/cmake/FindKDevPlatform.cmake @@ -0,0 +1,46 @@ +# +# Find the KDevelop Platform modules and sets various variables accordingly +# +# Example usage of this module: +# find_package(KDevPlatform 1.0.0 REQUIRED) +# +# The version number and REQUIRED flag are optional. You can set CMAKE_PREFIX_PATH +# variable to help it find the required files and directories + +# KDEVPLATFORM_FOUND - set to TRUE if the platform was found and the version is compatible FALSE otherwise +# +# KDEVPLATFORM_VERSION - The version number of kdevplatform +# KDEVPLATFORM_VERSION_MAJOR - The major version number of kdevplatform +# KDEVPLATFORM_VERSION_MINOR - The minor version number of kdevplatform +# KDEVPLATFORM_VERSION_PATCH - The patch version number of kdevplatform +# KDEVPLATFORM_INCLUDE_DIR - include dir of the platform, for example /usr/include/kdevplatform +# KDEVPLATFORM_INTERFACES_LIBRARIES - interfaces module library +# KDEVPLATFORM_LANGUAGE_LIBRARIES - language module library +# KDEVPLATFORM_OUTPUTVIEW_LIBRARIES - outputview module library +# KDEVPLATFORM_PROJECT_LIBRARIES - project module library +# KDEVPLATFORM_SUBLIME_LIBRARIES - sublime module library +# KDEVPLATFORM_SHELL_LIBRARIES - shell module library +# KDEVPLATFORM_TESTS_LIBRARIES - library to write tests for plugins, +# contains some useful tools and a way to replace parts of Core +# classes with custom implementations +# KDEVPLATFORM_UTIL_LIBRARIES - util module library +# KDEVPLATFORM_VCS_LIBRARIES - vcs module library +# KDEVPLATFORM_SOURCEFORMATTER_LIBRARIES - source formatter library +# KDEVPLATFORM_DEBUGGER_LIBRARIES - debugger module library +# +# The following macros are added (from KDevPlatformMacros.cmake): +# +# KDEVPLATFORM_ADD_APP_TEMPLATES( template1 ... templateN ) +# Use this to get packaged template archives for the given templates. +# Parameters should be the directories containing the templates. +# +# Copyright 2007 Andreas Pakulat +# Redistribution and use is allowed according to the terms of the BSD license. + +set(_KDevPlatform_FIND_QUIETLY ${KDevPlatform_FIND_QUIETLY}) +find_package( KDevPlatform ${KDevPlatform_FIND_VERSION} NO_MODULE ) +set(KDevPlatform_FIND_QUIETLY ${_KDevPlatform_FIND_QUIETLY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(KDevPlatform DEFAULT_MSG KDevPlatform_CONFIG ) +