2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.10.1)
|
|
|
|
|
2013-12-02 07:56:10 +00:00
|
|
|
project(kwin-compositing-kcm)
|
2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
################# Disallow in-source build #################
|
|
|
|
|
|
|
|
# Make CPack available to easy generate binary packages
|
|
|
|
include(CPack)
|
|
|
|
|
|
|
|
include(FeatureSummary)
|
|
|
|
|
|
|
|
################# set KDE specific information #################
|
|
|
|
|
|
|
|
find_package(ECM 0.0.8 REQUIRED NO_MODULE)
|
|
|
|
|
|
|
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
2013-07-29 15:58:45 +00:00
|
|
|
|
2013-11-05 16:01:17 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
|
2013-07-29 15:58:45 +00:00
|
|
|
|
2013-06-25 14:07:48 +00:00
|
|
|
|
2013-12-13 06:36:42 +00:00
|
|
|
find_package(KF5CoreAddons REQUIRED NO_MODULE)
|
2013-11-05 16:01:17 +00:00
|
|
|
|
|
|
|
include(KDEInstallDirs)
|
|
|
|
include(KDECMakeSettings)
|
|
|
|
include(KDECompilerSettings)
|
|
|
|
|
|
|
|
find_package(Qt5Core REQUIRED NO_MODULE)
|
2013-12-02 07:56:10 +00:00
|
|
|
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS DBus Quick Test Widgets)
|
2013-07-29 15:58:45 +00:00
|
|
|
|
2014-01-09 15:02:38 +00:00
|
|
|
# check for Qt5Multimedia (runtime-only dependency)
|
2014-01-09 16:01:20 +00:00
|
|
|
find_package(Qt5Multimedia QUIET)
|
2014-01-09 15:02:38 +00:00
|
|
|
set_package_properties(Qt5Multimedia PROPERTIES
|
|
|
|
PURPOSE "Runtime-only dependency for effect video playback"
|
|
|
|
TYPE RUNTIME
|
|
|
|
)
|
|
|
|
|
2013-07-29 16:04:20 +00:00
|
|
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0 -std=c++0x)
|
2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
if(KDE_PLATFORM_FEATURE_DISABLE_DEPRECATED)
|
|
|
|
set(KDE_NO_DEPRECATED TRUE)
|
|
|
|
set(CMAKE_AUTOMOC_MOC_OPTIONS "-DKDE_NO_DEPRECATED")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
################# now find all used packages #################
|
|
|
|
|
|
|
|
set (QT_MIN_VERSION "5.2.0")
|
|
|
|
|
|
|
|
|
|
|
|
# Load CMake, Compiler and InstallDirs settings from KF5 and the following are already somewhat "done" tier1/tier2 libs from kdelibs:
|
2013-12-13 06:36:42 +00:00
|
|
|
find_package(KF5 CONFIG REQUIRED COMPONENTS CoreAddons Config I18n Service XmlGui KCMUtils)
|
2013-11-05 16:01:17 +00:00
|
|
|
|
2013-07-29 15:58:45 +00:00
|
|
|
|
2013-12-13 06:36:42 +00:00
|
|
|
find_package(KF5Declarative REQUIRED NO_MODULE)
|
2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
|
|
|
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
|
|
|
|
|
2013-12-02 07:56:10 +00:00
|
|
|
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY)
|
2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
################# configure checks and create the configured files #################
|
|
|
|
|
|
|
|
# now create config headers
|
|
|
|
configure_file(config-prefix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-prefix.h )
|
|
|
|
configure_file(config-compiler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-compiler.h )
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
|
|
|
|
set(kwincomposing_SRC
|
|
|
|
model.cpp
|
2013-08-01 16:20:37 +00:00
|
|
|
main.cpp
|
2013-08-17 08:28:09 +00:00
|
|
|
compositing.cpp
|
2013-08-01 16:20:37 +00:00
|
|
|
effectconfig.cpp)
|
2013-06-25 14:07:48 +00:00
|
|
|
|
2013-08-09 12:29:05 +00:00
|
|
|
|
2013-12-02 08:55:21 +00:00
|
|
|
add_library(kwincompositing MODULE ${kwincomposing_SRC})
|
2013-06-25 14:07:48 +00:00
|
|
|
|
|
|
|
target_link_libraries(kwincompositing
|
2013-12-02 07:56:10 +00:00
|
|
|
Qt5::Quick
|
2013-08-20 17:12:09 +00:00
|
|
|
Qt5::DBus
|
2013-12-02 07:56:10 +00:00
|
|
|
Qt5::Widgets
|
2013-12-13 06:36:42 +00:00
|
|
|
KF5::CoreAddons
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::Declarative
|
|
|
|
KF5::I18n
|
|
|
|
KF5::Service
|
2013-09-25 13:45:04 +00:00
|
|
|
KF5::KCMUtils
|
2013-12-13 06:36:42 +00:00
|
|
|
KF5::Declarative
|
2013-12-02 07:56:10 +00:00
|
|
|
)
|
2013-09-10 08:41:42 +00:00
|
|
|
|
2013-08-02 13:21:33 +00:00
|
|
|
|
2013-08-09 12:29:05 +00:00
|
|
|
set(modelTest_SRC
|
|
|
|
model.cpp
|
|
|
|
effectconfig.cpp
|
2013-08-17 08:28:09 +00:00
|
|
|
compositing.cpp
|
2013-08-09 12:29:05 +00:00
|
|
|
test/effectmodeltest.cpp
|
|
|
|
test/modeltest.cpp)
|
|
|
|
|
|
|
|
add_executable(effectModelTest ${modelTest_SRC})
|
|
|
|
|
|
|
|
target_link_libraries(effectModelTest
|
2013-12-02 07:56:10 +00:00
|
|
|
Qt5::Quick
|
2013-08-20 17:12:09 +00:00
|
|
|
Qt5::DBus
|
2013-12-02 07:56:10 +00:00
|
|
|
Qt5::Test
|
|
|
|
Qt5::Widgets
|
2013-12-13 06:36:42 +00:00
|
|
|
KF5::CoreAddons
|
|
|
|
KF5::ConfigCore
|
|
|
|
KF5::Declarative
|
|
|
|
KF5::I18n
|
|
|
|
KF5::Service
|
2013-09-25 13:45:04 +00:00
|
|
|
KF5::KCMUtils
|
2013-12-13 06:36:42 +00:00
|
|
|
KF5::Declarative)
|
2013-08-20 17:12:09 +00:00
|
|
|
|
2013-06-25 14:07:48 +00:00
|
|
|
INSTALL(DIRECTORY qml DESTINATION ${DATA_INSTALL_DIR}/kwincompositing)
|
2013-12-02 08:55:21 +00:00
|
|
|
INSTALL(TARGETS kwincompositing DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
|
install(FILES kwincompositing.desktop DESTINATION ${SERVICES_INSTALL_DIR})
|
2013-06-25 14:07:48 +00:00
|
|
|
################# list the subdirectories #################
|
|
|
|
|
2014-01-09 16:01:20 +00:00
|
|
|
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|