diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d84b27..fda7dce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,71 +1,71 @@ cmake_minimum_required(VERSION 3.0) project(decoration-api) set(PROJECT_VERSION "5.12.80") set(QT_MIN_VERSION "5.9.0") set(KF5_MIN_VERSION "5.42.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(ECMSetupVersion) include(ECMGenerateHeaders) include(FeatureSummary) include(GenerateExportHeader) include(CMakePackageConfigHelpers) ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KDECORATION2 VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdecoration2_version.h" PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KDecoration2ConfigVersion.cmake" SOVERSION 5) #dependencies find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Test ) # require at least gcc 4.8 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8") message(SEND_ERROR "Version ${CMAKE_CXX_COMPILER_VERSION} of the ${CMAKE_CXX_COMPILER_ID} C++ compiler is not supported. Please use version 4.8 or later.") endif() endif() -set(KDECORATION2_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/KDecoration2") +set(KDECORATION2_INCLUDEDIR "${KDE_INSTALL_INCLUDEDIR}/KDecoration2") find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED) # Subdirectories add_subdirectory(src) if(BUILD_TESTING) add_subdirectory(autotests) endif() # create a Config.cmake and a ConfigVersion.cmake file and install them set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KDecoration2") configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KDecoration2Config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/KDecoration2Config.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KDecoration2Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/KDecoration2ConfigVersion.cmake" DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel ) install(EXPORT KDecoration2Targets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KDecoration2Targets.cmake NAMESPACE KDecoration2:: ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdecoration2_version.h DESTINATION ${KF5_INCLUDE_INSTALL_DIR} COMPONENT Devel ) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) ki18n_install(po) diff --git a/README.md b/README.md index 7e52b4d..5494934 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,50 @@ # KDecoration2 Plugin based library to create window decorations. ## Introduction KDecoration2 is a library to create window decorations. These window decorations can be used by for example an X11 based window manager which re-parents a Client window to a window decoration frame. The library consists of two parts: * Decoration API for implementing a Decoration theme * Private API to implement the backend part (e.g. from Window Manager side) ## Providing a Decoration To provide a custom decoration one needs to create a plugin and provide an own implementation of KDecoration2::Decoration. For a framework to load and find the plugin it needs to be compiled with the proper json metadata. An example for such metadata (deco.json): { "KPlugin": { "Id": "org.kde.myAweseomeDecoration", "ServiceTypes": [ "org.kde.kdecoration2" ] }, "org.kde.kdecoration2": { "blur": false, /* blur behind not needed */ "kcmodule": true /* comes with a configuration module */ } } To simplify one can use the KPluginFactory macro from the KCoreAddons framework: K_PLUGIN_FACTORY_WITH_JSON( MyAwesomeDecorationFactory, "deco.json", registerPlugin(); ) -The plugin needs to get installed to `${PLUGIN_INSTALL_DIR}/org.kde.kdecoration2`. +The plugin needs to get installed to `${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration2`. ## Links - Home page: - Mailing list: - IRC channel: #kde-devel or #kwin on Freenode - Git repository: