diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f9a7bb243..08ae3dacd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,172 +1,171 @@ # kdevplatform version set(KDEVPLATFORM_VERSION_MAJOR 1) set(KDEVPLATFORM_VERSION_MINOR 90) set(KDEVPLATFORM_VERSION_PATCH 90) # plugin versions listed in the .desktop files set(KDEV_PLUGIN_VERSION 21) # Increase this to reset incompatible item-repositories set(KDEV_ITEMREPOSITORY_VERSION 81) # library version / SO version set(KDEVPLATFORM_LIB_VERSION 9.0.0) set(KDEVPLATFORM_LIB_SOVERSION 9) ################################################################################ cmake_minimum_required(VERSION 2.8.12) project(KDevPlatform) # we need some parts of the ECM CMake helpers find_package (ECM 0.0.9 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${KDevPlatform_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH}) include(ECMAddTests) include(ECMOptionalAddSubdirectory) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMMarkAsTest) include(ECMMarkNonGuiExecutable) include(ECMGenerateHeaders) include(ECMPackageConfigHelpers) include(GenerateExportHeader) include(FeatureSummary) include(WriteBasicConfigVersionFile) include(CheckFunctionExists) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(KDevPlatformMacros) set(QT_MIN_VERSION "5.2.0") find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Declarative DBus Widgets Script WebKitWidgets Concurrent Test) find_package(Qt5QuickWidgets ${QT_MIN_VERSION}) set_package_properties(Qt5QuickWidgets PROPERTIES PURPOSE "Qt5 QuickWidgets library (part of Qt >=5.3). Required for the Welcome Page plugin." ) set(KF5_DEP_VERSION "5.3.0") find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Archive Config GuiAddons WidgetsAddons + IconThemes I18n ItemModels ItemViews JobWidgets KCMUtils KIO NewStuff + Notifications NotifyConfig Parts Service Sonnet TextEditor ThreadWeaver WindowSystem Declarative XmlGui - - # TODO KF5: Port away from this - KDELibs4Support ) find_package(Grantlee5 REQUIRED) set_package_properties(Grantlee5 PROPERTIES PURPOSE "Grantlee templating library, needed for file templates" URL "http://www.grantlee.org/") add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_URL_CAST_FROM_STRING) remove_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0) # comes from KDELibs4Support add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000) # Turn off missing-field-initializers warning for GCC to avoid noise from false positives with empty {} # See discussion: http://mail.kde.org/pipermail/kdevelop-devel/2014-February/046910.html if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers") endif() configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-kdevplatform.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdevplatform.h ) include_directories(${KDevPlatform_SOURCE_DIR} ${KDevPlatform_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/) # Now set the usual KDEVPLATFORM_XXX_LIBRARIES variable so we can more easily move plugins around set(KDEVPLATFORM_SUBLIME_LIBRARIES KDev::Sublime) set(KDEVPLATFORM_INTERFACES_LIBRARIES KDev::Interfaces) set(KDEVPLATFORM_LANGUAGE_LIBRARIES KDev::Language) set(KDEVPLATFORM_PROJECT_LIBRARIES KDev::Project) set(KDEVPLATFORM_UTIL_LIBRARIES KDev::Util) set(KDEVPLATFORM_OUTPUTVIEW_LIBRARIES KDev::OutputView) set(KDEVPLATFORM_VCS_LIBRARIES KDev::Vcs) set(KDEVPLATFORM_SHELL_LIBRARIES KDev::Shell) set(KDEVPLATFORM_TESTS_LIBRARIES KDev::Tests) set(KDEVPLATFORM_JSONTESTS_LIBRARIES KDev::JsonTests) set(KDEVPLATFORM_DEBUGGER_LIBRARIES KDev::Debugger) set(KDEVPLATFORM_DOCUMENTATION_LIBRARIES KDev::Documentation) set(KDEVPLATFORM_SERIALIZATION_LIBRARIES KDev::Serialization) string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "debug" OR CMAKE_BUILD_TYPE_TOLOWER STREQUAL "") set(COMPILER_OPTIMIZATIONS_DISABLED TRUE) else() set(COMPILER_OPTIMIZATIONS_DISABLED FALSE) endif() add_subdirectory(sublime) add_subdirectory(interfaces) add_subdirectory(project) add_subdirectory(language) add_subdirectory(shell) add_subdirectory(util) add_subdirectory(outputview) add_subdirectory(vcs) add_subdirectory(pics) #ecm_optional_add_subdirectory(doc) add_subdirectory(debugger) add_subdirectory(documentation) add_subdirectory(serialization) add_subdirectory(template) add_subdirectory(tests) add_subdirectory(plugins) set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KDevPlatform") ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KDevPlatformConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/KDevPlatformConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) ecm_setup_version(${KDEVPLATFORM_VERSION_MAJOR}.${KDEVPLATFORM_VERSION_MINOR}.${KDEVPLATFORM_VERSION_PATCH} VARIABLE_PREFIX KDEVPLATFORM VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdevplatform_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KDevPlatformConfigVersion.cmake" SOVERSION ${KDEVPLATFORM_LIB_SOVERSION}) install( FILES "${KDevPlatform_BINARY_DIR}/kdevplatform_version.h" "${KDevPlatform_BINARY_DIR}/config-kdevplatform.h" DESTINATION "${INCLUDE_INSTALL_DIR}/kdevplatform" ) install( FILES "${KDevPlatform_BINARY_DIR}/KDevPlatformConfig.cmake" "${KDevPlatform_BINARY_DIR}/KDevPlatformConfigVersion.cmake" cmake/modules/KDevPlatformMacros.cmake DESTINATION "${CMAKECONFIG_INSTALL_DIR}" ) install( EXPORT KDevPlatformTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" NAMESPACE KDev:: FILE KDevPlatformTargets.cmake ) include(CTest) # CTestCustom.cmake has to be in the CTEST_BINARY_DIR. # in the KDE build system, this is the same as CMAKE_BINARY_DIR. configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/plugins/patchreview/CMakeLists.txt b/plugins/patchreview/CMakeLists.txt index b8b5864667..66eecd628e 100644 --- a/plugins/patchreview/CMakeLists.txt +++ b/plugins/patchreview/CMakeLists.txt @@ -1,21 +1,21 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevpatchreview\") find_package(LibKompareDiff2 REQUIRED) kde_enable_exceptions() include_directories(${LIBKOMPAREDIFF2_INCLUDE_DIR}) set(patchreview_PART_SRCS patchreview.cpp patchhighlighter.cpp patchreviewtoolview.cpp localpatchsource.cpp standardpatchexport.cpp ) ki18n_wrap_ui(patchreview_PART_SRCS patchreview.ui localpatchwidget.ui) kdevplatform_add_plugin(kdevpatchreview JSON kdevpatchreview.json SOURCES ${patchreview_PART_SRCS}) -target_link_libraries(kdevpatchreview KF5::IconThemes KF5::TextEditor KF5::Parts KF5::KDELibs4Support KDev::Interfaces KDev::Util KDev::Language KDev::Vcs KDev::Sublime ${LIBKOMPAREDIFF2_LIBRARIES}) +target_link_libraries(kdevpatchreview KF5::IconThemes KF5::TextEditor KF5::Parts KDev::Interfaces KDev::Util KDev::Language KDev::Vcs KDev::Sublime ${LIBKOMPAREDIFF2_LIBRARIES}) ########### install files ############### install(FILES kdevpatchreview.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevpatchreview) diff --git a/plugins/projectfilter/tests/CMakeLists.txt b/plugins/projectfilter/tests/CMakeLists.txt index 608e84720f..0656e5569a 100644 --- a/plugins/projectfilter/tests/CMakeLists.txt +++ b/plugins/projectfilter/tests/CMakeLists.txt @@ -1,7 +1,7 @@ set(test_projectfilter_SRCS test_projectfilter.cpp ../projectfilter.cpp ../filter.cpp) ecm_add_test(${test_projectfilter_SRCS} TEST_NAME test_projectfilter - LINK_LIBRARIES KDev::Project KDev::Tests ${QT_QTTEST_LIBRARIES}) + LINK_LIBRARIES KDev::Project KDev::Tests Qt5::Test) diff --git a/plugins/projectmanagerview/CMakeLists.txt b/plugins/projectmanagerview/CMakeLists.txt index e534cb03b7..e5d250e93a 100644 --- a/plugins/projectmanagerview/CMakeLists.txt +++ b/plugins/projectmanagerview/CMakeLists.txt @@ -1,28 +1,27 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdevprojectmanagerview\") ########### next target ############### set(kdevprojectmanagerview_PLUGIN_SRCS projectmanagerviewplugin.cpp projectmanagerview.cpp projectmodelsaver.cpp projecttreeview.cpp projectbuildsetwidget.cpp vcsoverlayproxymodel.cpp projectmodelitemdelegate.cpp ) ki18n_wrap_ui( kdevprojectmanagerview_PLUGIN_SRCS projectbuildsetwidget.ui projectmanagerview.ui ) kdevplatform_add_plugin(kdevprojectmanagerview JSON kdevprojectmanagerview.json SOURCES ${kdevprojectmanagerview_PLUGIN_SRCS}) target_link_libraries(kdevprojectmanagerview KF5::TextEditor KF5::ThreadWeaver - KF5::KDELibs4Support KDev::Interfaces KDev::Project KDev::Language KDev::Util KDev::Vcs KDev::Sublime ) ########### install files ############### install( FILES kdevprojectmanagerview.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kdevprojectmanagerview ) diff --git a/plugins/quickopen/tests/CMakeLists.txt b/plugins/quickopen/tests/CMakeLists.txt index 096be5c867..a85b6c92ff 100644 --- a/plugins/quickopen/tests/CMakeLists.txt +++ b/plugins/quickopen/tests/CMakeLists.txt @@ -1,12 +1,12 @@ add_library(quickopentestbase STATIC quickopentestbase.cpp ../projectfilequickopen.cpp) target_link_libraries(quickopentestbase PUBLIC - Qt5::Test KF5::IconThemes KF5::KDELibs4Support KDev::Tests KDev::Project KDev::Language) + Qt5::Test KF5::IconThemes KDev::Tests KDev::Project KDev::Language) ecm_add_test(test_quickopen.cpp LINK_LIBRARIES quickopentestbase) if(NOT COMPILER_OPTIMIZATIONS_DISABLED) ecm_add_test(bench_quickopen.cpp LINK_LIBRARIES quickopentestbase) set_tests_properties(bench_quickopen PROPERTIES TIMEOUT 30) endif() diff --git a/plugins/welcomepage/CMakeLists.txt b/plugins/welcomepage/CMakeLists.txt index 58d24a9c2c..dbb651af19 100644 --- a/plugins/welcomepage/CMakeLists.txt +++ b/plugins/welcomepage/CMakeLists.txt @@ -1,19 +1,18 @@ add_subdirectory(declarative) set(welcomepage_SRCS welcomepageplugin.cpp welcomepagedocument.cpp sessionsmodel.cpp welcomepageview.cpp uihelper.cpp) qt5_add_resources(welcomepage_SRCS welcomepage.qrc) kdevplatform_add_plugin(kdevwelcomepage JSON kdevwelcomepage.json SOURCES ${welcomepage_SRCS}) target_link_libraries(kdevwelcomepage KDev::Interfaces KDev::Sublime KDev::Shell KDev::Project Qt5::QuickWidgets KF5::Declarative - KF5::KDELibs4Support ) diff --git a/shell/tests/CMakeLists.txt b/shell/tests/CMakeLists.txt index 71b99a0bc9..2e0b28a7f8 100644 --- a/shell/tests/CMakeLists.txt +++ b/shell/tests/CMakeLists.txt @@ -1,38 +1,38 @@ # also needed for the plugin, so the plugincontrollertest knows the binary dir #add_definitions( -DBUILD_DIR="\\"${KDevPlatform_BINARY_DIR}\\"" ) include_directories( ${KDevPlatform_SOURCE_DIR} ${KDevPlatform_SOURCE_DIR}/interfaces ${KDevPlatform_SOURCE_DIR}/shell ) ecm_add_test(test_documentcontroller.cpp LINK_LIBRARIES Qt5::Test KDev::Tests) ecm_add_test(test_uicontroller.cpp LINK_LIBRARIES Qt5::Test KDev::Tests) ecm_add_test(test_shellbuddy.cpp LINK_LIBRARIES Qt5::Test KDev::Tests KDev::Shell KDev::Interfaces KDev::Sublime) ecm_add_test(test_shelldocumentoperation.cpp LINK_LIBRARIES Qt5::Test KDev::Tests KDev::Shell KDev::Interfaces KDev::Sublime) ecm_add_test(test_projectcontroller.cpp TEST_NAME test_projectcontroller LINK_LIBRARIES Qt5::Test KDev::Tests KDev::Shell KDev::Sublime KDev::Project KDev::Interfaces) ecm_add_test(test_sessioncontroller.cpp - LINK_LIBRARIES Qt5::Test KF5::KDELibs4Support KF5::KIOWidgets KDev::Tests KDev::Shell KDev::Interfaces KDev::Sublime) + LINK_LIBRARIES Qt5::Test KF5::KIOWidgets KDev::Tests KDev::Shell KDev::Interfaces KDev::Sublime) configure_file("testfilepaths.h.cmake" "testfilepaths.h" ESCAPE_QUOTES) configure_file(share/kde4/services/kdevnonguiinterfaceplugin.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kservices5/kdevnonguiinterfaceplugin.desktop) set( plugincontrollertest_plugin_SRCS nonguiinterfaceplugin.cpp ) add_library( kdevnonguiinterfaceplugin MODULE ${plugincontrollertest_plugin_SRCS} ) target_link_libraries( kdevnonguiinterfaceplugin Qt5::Core KDev::Interfaces ) ecm_add_test(test_plugincontroller.cpp LINK_LIBRARIES Qt5::Test KDev::Tests KDev::Shell KDev::Interfaces KDev::Sublime) ecm_add_test(test_testcontroller.cpp LINK_LIBRARIES Qt5::Test KDev::Tests)