From 18a7b9c1a26f6e2e8cb5d717d5626af60ade433c Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 6 Nov 2015 13:03:02 +0200 Subject: [PATCH] generic: build system cleanups Signed-off-by: Ivailo Monev --- CMakeLists.txt | 15 ++++ .../check_installed_exports_file.cmake | 73 +++++++++++++++++++ kcontrol/CMakeLists.txt | 17 +++-- kcontrol/PURPOSE | 3 +- kcontrol/componentchooser/CMakeLists.txt | 42 +++++------ .../componentservices/CMakeLists.txt | 12 ++- .../windowmanagers/CMakeLists.txt | 12 ++- kcontrol/dateandtime/CMakeLists.txt | 37 ++++++++-- kcontrol/desktoppaths/CMakeLists.txt | 19 +++-- kcontrol/desktoptheme/CMakeLists.txt | 12 ++- kcontrol/dnssd/CMakeLists.txt | 24 +++--- kcontrol/emoticons/CMakeLists.txt | 27 +++++-- kcontrol/fonts/CMakeLists.txt | 30 ++++++-- kcontrol/hardware/CMakeLists.txt | 13 ++-- kcontrol/hardware/display/CMakeLists.txt | 26 ++++--- kcontrol/hardware/joystick/CMakeLists.txt | 35 +++++---- kcontrol/icons/CMakeLists.txt | 24 ++++-- kcontrol/icons/tests/CMakeLists.txt | 12 +-- kcontrol/locale/CMakeLists.txt | 2 +- 19 files changed, 306 insertions(+), 129 deletions(-) create mode 100644 cmake/modules/check_installed_exports_file.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 26a15a92..5bffe7c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ project(kde-workspace) +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") + include(CheckIncludeFiles) include(CheckFunctionExists) @@ -318,6 +321,18 @@ install( DESTINATION ${LIB_INSTALL_DIR}/cmake/KDE4Workspace ) +# run a script before installing the exports files which deletes previously installed +# configuration specific export files KDELibs4(Library|Tools)Targets-.cmake +# if the main exports file KDELibs4(Library|Tools)Targets.cmake has changed. This makes sure +# that this main file doesn't include older and different configuration specific exports files, +# which might have a different set of targets or targets with different names. +# The code for installing the exports files will soon go into a macro. Alex +install( + CODE "set(EXPORT_FILES KDE4WorkspaceLibraryTargets.cmake)" + CODE "set(EXPORT_INSTALL_DIR \"${DATA_INSTALL_DIR}/cmake/modules\")" + SCRIPT "${CMAKE_SOURCE_DIR}/cmake/modules/check_installed_exports_file.cmake" +) + install( EXPORT kdeworkspaceLibraryTargets NAMESPACE ${KDE4WORKSPACE_TARGET_PREFIX} diff --git a/cmake/modules/check_installed_exports_file.cmake b/cmake/modules/check_installed_exports_file.cmake new file mode 100644 index 00000000..d1d0c718 --- /dev/null +++ b/cmake/modules/check_installed_exports_file.cmake @@ -0,0 +1,73 @@ + +# This file is executed via install(SCRIPT). +# This means it is include()d into the cmake_install.cmake file +# Due to this the following variables already have the correct value: +# CMAKE_INSTALL_PREFIX +# CMAKE_CURRENT_BINARY_DIR +# +# Additionally the following two variables have to be set: +# EXPORT_INSTALL_DIR - set it to the install destination +# EXPORT_FILES - the filenames of the exports file +# +# Alex + + +# put all the code into a function so all variables used here are local +# which makes sure including this file multiple times in a cmake_install.cmake works +function(CHECK_INSTALLED_EXPORTS_FILE _filename) + + # get the absolute install directory, consider absolute and relative paths and also DESTDIR + if(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}") + set(installDir "$ENV{DESTDIR}${EXPORT_INSTALL_DIR}") + else(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}") + set(installDir "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${EXPORT_INSTALL_DIR}") + endif(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}") + + set(installedExportsFile "${installDir}/${_filename}") + + #message(STATUS "************ bin dir: ${CMAKE_CURRENT_BINARY_DIR}") + #message(STATUS "************ prefix: ${CMAKE_INSTALL_PREFIX}") + #message(STATUS "************ exportsfile: ${installedExportsFile}") + + # if the file already exists at the install location, and if we can + # find the exports file in the build dir, read both, and if their contents differ, + # remove all configuration-specific exports files from the install dir, since + # they may create conflicts if the new targets have been added/targets have been + # removed/ targets have been renamed/ the namespace for the exported targets has changed + if(EXISTS "${installedExportsFile}") + if (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + set(binaryDirExportFileDir "_${CMAKE_MATCH_2}") + set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${binaryDirExportFileDir}/${_filename}") + else (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${EXPORT_INSTALL_DIR}/${_filename}") + endif (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + + # message(STATUS "************* binaryDirExportsFile: ${binaryDirExportsFile}") + + if(EXISTS "${binaryDirExportsFile}") + file(READ "${installedExportsFile}" installedExportsFileContents) + file(READ "${binaryDirExportsFile}" binaryDirExportsFileContents) + + if(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + + if("${_filename}" MATCHES "^(.+)(\\.cmake)$") + message(STATUS "XXX Installed and new ${_filename} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files") + file(GLOB exportFiles "${installDir}/${CMAKE_MATCH_1}-*.cmake") +# message(STATUS "XXX files: ${exportFiles}") + file(REMOVE ${exportFiles}) + endif("${_filename}" MATCHES "^(.+)(\\.cmake)$") + else(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") +# message(STATUS "XXX FILES ${_filename} are the same") + endif(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + + endif(EXISTS "${binaryDirExportsFile}") + + endif(EXISTS "${installedExportsFile}") + +endfunction(CHECK_INSTALLED_EXPORTS_FILE) + +# call the function for each exports file +foreach(_currentExportsFile ${EXPORT_FILES}) + check_installed_exports_file("${_currentExportsFile}") +endforeach(_currentExportsFile ${EXPORT_FILES}) + diff --git a/kcontrol/CMakeLists.txt b/kcontrol/CMakeLists.txt index 669acdca..ed080c38 100644 --- a/kcontrol/CMakeLists.txt +++ b/kcontrol/CMakeLists.txt @@ -1,14 +1,15 @@ macro_optional_find_package(Freetype) -set_package_properties(Freetype PROPERTIES DESCRIPTION "A font rendering engine" - URL "http://www.freetype.org" - TYPE OPTIONAL - PURPOSE "Needed to build kfontinst, a simple font installer." - ) - - -set(libkxftconfig_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/fonts/kxftconfig.cpp ) +set_package_properties(Freetype PROPERTIES + DESCRIPTION "A font rendering engine" + URL "http://www.freetype.org" + PURPOSE "Needed to build kfontinst, a simple font installer." + TYPE OPTIONAL +) +set(libkxftconfig_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/fonts/kxftconfig.cpp +) if( X11_Xrandr_FOUND ) add_subdirectory( randr ) diff --git a/kcontrol/PURPOSE b/kcontrol/PURPOSE index ef03e579..6a821d60 100644 --- a/kcontrol/PURPOSE +++ b/kcontrol/PURPOSE @@ -7,4 +7,5 @@ System Settings is not: -System Administration/Configuration -Tools/Utilities -On other environments the already provided equivalent should be used. In KDE the other environment equivalents should not be needed. +On other environments the already provided equivalent should be used. +In KDE the other environment equivalents should not be needed. diff --git a/kcontrol/componentchooser/CMakeLists.txt b/kcontrol/componentchooser/CMakeLists.txt index 06a643ee..ac11e37b 100644 --- a/kcontrol/componentchooser/CMakeLists.txt +++ b/kcontrol/componentchooser/CMakeLists.txt @@ -1,43 +1,41 @@ - -add_subdirectory( componentservices ) -add_subdirectory( windowmanagers ) +add_subdirectory(componentservices) +add_subdirectory(windowmanagers) ########### next target ############### set(kcm_componentchooser_SRCS - componentchooser.cpp - componentchooserbrowser.cpp - componentchooserfilemanager.cpp - componentchooseremail.cpp - kcm_componentchooser.cpp + componentchooser.cpp + componentchooserbrowser.cpp + componentchooserfilemanager.cpp + componentchooseremail.cpp + kcm_componentchooser.cpp ) set(kcm_componentchooser_SRCS ${kcm_componentchooser_SRCS} componentchooserterminal.cpp ktimerdialog.cpp - browserconfig_ui.ui - filemanagerconfig_ui.ui - emailclientconfig_ui.ui - componentchooser_ui.ui - componentconfig_ui.ui - terminalemulatorconfig_ui.ui - wmconfig_ui.ui ) if(Q_WS_X11) - set(kcm_componentchooser_SRCS ${kcm_componentchooser_SRCS} - componentchooserwm.cpp ) -endif(Q_WS_X11) + set(kcm_componentchooser_SRCS + ${kcm_componentchooser_SRCS} + componentchooserwm.cpp + ) +endif() kde4_add_plugin(kcm_componentchooser ${kcm_componentchooser_SRCS}) target_link_libraries(kcm_componentchooser ${KDE4_KIO_LIBS}) -install(TARGETS kcm_componentchooser DESTINATION ${PLUGIN_INSTALL_DIR} ) - +install( + TARGETS kcm_componentchooser + DESTINATION ${PLUGIN_INSTALL_DIR} +) ########### install files ############### -install(FILES componentchooser.desktop DESTINATION ${SERVICES_INSTALL_DIR}) - +install( + FILES componentchooser.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/componentchooser/componentservices/CMakeLists.txt b/kcontrol/componentchooser/componentservices/CMakeLists.txt index 3f45d66e..cfed0597 100644 --- a/kcontrol/componentchooser/componentservices/CMakeLists.txt +++ b/kcontrol/componentchooser/componentservices/CMakeLists.txt @@ -1,3 +1,9 @@ -install( FILES kcm_kemail.desktop kcm_browser.desktop - kcm_filemanager.desktop kcm_terminal.desktop kcm_wm.desktop - DESTINATION ${DATA_INSTALL_DIR}/kcm_componentchooser ) +install( + FILES + kcm_kemail.desktop + kcm_browser.desktop + kcm_filemanager.desktop + kcm_terminal.desktop + kcm_wm.desktop + DESTINATION ${DATA_INSTALL_DIR}/kcm_componentchooser +) diff --git a/kcontrol/componentchooser/windowmanagers/CMakeLists.txt b/kcontrol/componentchooser/windowmanagers/CMakeLists.txt index 499d8c26..88184d76 100644 --- a/kcontrol/componentchooser/windowmanagers/CMakeLists.txt +++ b/kcontrol/componentchooser/windowmanagers/CMakeLists.txt @@ -1,5 +1,11 @@ ########### install files ############### -file(GLOB desktop_file "*.desktop") -install( FILES ${desktop_file} - DESTINATION ${DATA_INSTALL_DIR}/ksmserver/windowmanagers ) +install( + FILES + compiz-custom.desktop + compiz.desktop + marco.desktop + metacity.desktop + openbox.desktop + DESTINATION ${DATA_INSTALL_DIR}/ksmserver/windowmanagers +) diff --git a/kcontrol/dateandtime/CMakeLists.txt b/kcontrol/dateandtime/CMakeLists.txt index 9193856f..236713c5 100644 --- a/kcontrol/dateandtime/CMakeLists.txt +++ b/kcontrol/dateandtime/CMakeLists.txt @@ -1,20 +1,41 @@ ########### next target ############### -set(kcm_clock_PART_SRCS dtime.cpp main.cpp dateandtime.ui) +set(kcm_clock_PART_SRCS + dtime.cpp + main.cpp +) kde4_add_plugin(kcm_clock ${kcm_clock_PART_SRCS}) -target_link_libraries(kcm_clock ${KDE4_KIO_LIBS} ${KDE4_PLASMA_LIBS} ) +target_link_libraries(kcm_clock + ${KDE4_KIO_LIBS} + ${KDE4_PLASMA_LIBS} +) -install(TARGETS kcm_clock DESTINATION ${PLUGIN_INSTALL_DIR} ) +install( + TARGETS kcm_clock + DESTINATION ${PLUGIN_INSTALL_DIR} +) ########### next target ############### -add_executable(kcmdatetimehelper helper.cpp ${helper_mocs}) -target_link_libraries(kcmdatetimehelper ${KDE4_KDECORE_LIBS}) -install(TARGETS kcmdatetimehelper DESTINATION ${LIBEXEC_INSTALL_DIR}) +add_executable(kcmdatetimehelper helper.cpp) -kde4_install_auth_helper_files(kcmdatetimehelper org.kde.kcontrol.kcmclock root) +target_link_libraries(kcmdatetimehelper ${KDE4_KDECORE_LIBS}) + +install( + TARGETS kcmdatetimehelper + DESTINATION ${LIBEXEC_INSTALL_DIR} +) + +kde4_install_auth_helper_files( + kcmdatetimehelper + org.kde.kcontrol.kcmclock + root +) ########### install files ############### -install( FILES clock.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( + FILES clock.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/desktoppaths/CMakeLists.txt b/kcontrol/desktoppaths/CMakeLists.txt index 0d94c9f6..d447f813 100644 --- a/kcontrol/desktoppaths/CMakeLists.txt +++ b/kcontrol/desktoppaths/CMakeLists.txt @@ -1,12 +1,21 @@ set(kcm_desktoppaths_PART_SRCS - globalpaths.cpp - kcmdesktoppaths.cpp + globalpaths.cpp + kcmdesktoppaths.cpp ) kde4_add_plugin(kcm_desktoppaths ${kcm_desktoppaths_PART_SRCS}) -target_link_libraries(kcm_desktoppaths ${KDE4_KCMUTILS_LIBS} ${KDE4_KIO_LIBS}) +target_link_libraries(kcm_desktoppaths + ${KDE4_KCMUTILS_LIBS} + ${KDE4_KIO_LIBS} +) -install(TARGETS kcm_desktoppaths DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES desktoppath.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install( + TARGETS kcm_desktoppaths + DESTINATION ${PLUGIN_INSTALL_DIR} +) +install( + FILES desktoppath.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/desktoptheme/CMakeLists.txt b/kcontrol/desktoptheme/CMakeLists.txt index 319b26ef..914752d8 100644 --- a/kcontrol/desktoptheme/CMakeLists.txt +++ b/kcontrol/desktoptheme/CMakeLists.txt @@ -4,8 +4,6 @@ set(kcmdesktoptheme_SRCS kcmdesktoptheme.cpp desktopthemedetails.cpp thememodel.cpp - DesktopTheme.ui - DesktopThemeDetails.ui ) kde4_add_plugin(kcm_desktoptheme ${kcmdesktoptheme_SRCS}) @@ -18,9 +16,15 @@ target_link_libraries(kcm_desktoptheme ${KDE4_KIO_LIBS} ) -install(TARGETS kcm_desktoptheme DESTINATION ${PLUGIN_INSTALL_DIR}) +install( + TARGETS kcm_desktoptheme + DESTINATION ${PLUGIN_INSTALL_DIR} +) ########### install files ############### -install(FILES desktoptheme.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install( + FILES desktoptheme.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/dnssd/CMakeLists.txt b/kcontrol/dnssd/CMakeLists.txt index 59984cb1..2df2b6c9 100644 --- a/kcontrol/dnssd/CMakeLists.txt +++ b/kcontrol/dnssd/CMakeLists.txt @@ -1,18 +1,20 @@ - - - ########### next target ############### -set(kcm_kdnssd_PART_SRCS kcmdnssd.cpp kcmdnssd.h configdialog.ui) +kde4_add_plugin(kcm_kdnssd kcmdnssd.cpp) -kde4_add_plugin(kcm_kdnssd ${kcm_kdnssd_PART_SRCS}) - - -target_link_libraries(kcm_kdnssd ${KDE4_KDNSSD_LIBS} ${KDE4_KDEUI_LIBS}) - -install(TARGETS kcm_kdnssd DESTINATION ${PLUGIN_INSTALL_DIR}) +target_link_libraries(kcm_kdnssd + ${KDE4_KDNSSD_LIBS} + ${KDE4_KDEUI_LIBS} +) +install( + TARGETS kcm_kdnssd + DESTINATION ${PLUGIN_INSTALL_DIR} +) ########### install files ############### -install(FILES kcm_kdnssd.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +install( + FILES kcm_kdnssd.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/emoticons/CMakeLists.txt b/kcontrol/emoticons/CMakeLists.txt index 29a1b304..833d0e8d 100644 --- a/kcontrol/emoticons/CMakeLists.txt +++ b/kcontrol/emoticons/CMakeLists.txt @@ -1,10 +1,23 @@ -set(kcmemoticons_SRCS emoticonslist.cpp emoticonslist.ui) +kde4_add_plugin(kcm_emoticons emoticonslist.cpp) -kde4_add_plugin(kcm_emoticons ${kcmemoticons_SRCS}) -target_link_libraries(kcm_emoticons ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KEMOTICONS_LIBRARY}) - -install(TARGETS kcm_emoticons DESTINATION ${PLUGIN_INSTALL_DIR} ) +target_link_libraries(kcm_emoticons + ${KDE4_KDEUI_LIBS} + ${KDE4_KPARTS_LIBS} + ${KDE4_KEMOTICONS_LIBRARY} +) ########### install files ############### -install( FILES emoticons.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES emoticons.knsrc DESTINATION ${CONFIG_INSTALL_DIR} ) + +install( + TARGETS kcm_emoticons + DESTINATION ${PLUGIN_INSTALL_DIR} +) + +install( + FILES emoticons.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) +install( + FILES emoticons.knsrc + DESTINATION ${CONFIG_INSTALL_DIR} +) diff --git a/kcontrol/fonts/CMakeLists.txt b/kcontrol/fonts/CMakeLists.txt index 3e2a3651..91146fa0 100644 --- a/kcontrol/fonts/CMakeLists.txt +++ b/kcontrol/fonts/CMakeLists.txt @@ -5,16 +5,25 @@ include_directories(${FREETYPE_INCLUDE_DIRS}) ########### next target ############### -set(kcm_fonts_PART_SRCS ../krdb/krdb.cpp fonts.cpp) +set(kcm_fonts_PART_SRCS + ../krdb/krdb.cpp + fonts.cpp +) if(Q_WS_X11) - set(kcm_fonts_PART_SRCS ${kcm_fonts_PART_SRCS} ${libkxftconfig_SRCS}) + set(kcm_fonts_PART_SRCS + ${kcm_fonts_PART_SRCS} + ${libkxftconfig_SRCS} + ) endif(Q_WS_X11) kde4_add_plugin(kcm_fonts ${kcm_fonts_PART_SRCS}) - -target_link_libraries(kcm_fonts ${KDE4_KDEUI_LIBS} ${FREETYPE_LIBRARIES} ${QT_QTXML_LIBRARY}) +target_link_libraries(kcm_fonts + ${KDE4_KDEUI_LIBS} + ${FREETYPE_LIBRARIES} + ${QT_QTXML_LIBRARY} +) if(Q_WS_X11) if(FONTCONFIG_FOUND) @@ -24,9 +33,14 @@ if(Q_WS_X11) target_link_libraries(kcm_fonts ${X11_LIBRARIES}) endif(Q_WS_X11) -install(TARGETS kcm_fonts DESTINATION ${PLUGIN_INSTALL_DIR} ) - - ########### install files ############### -install( FILES fonts.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( + TARGETS kcm_fonts + DESTINATION ${PLUGIN_INSTALL_DIR} +) + +install( + FILES fonts.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/hardware/CMakeLists.txt b/kcontrol/hardware/CMakeLists.txt index d938c974..8adf1476 100644 --- a/kcontrol/hardware/CMakeLists.txt +++ b/kcontrol/hardware/CMakeLists.txt @@ -1,9 +1,6 @@ +add_subdirectory(display) -add_subdirectory( display ) - -if (CMAKE_SYSTEM_NAME MATCHES Linux) - # this one doesn't seem to be very portable, Alex - add_subdirectory( joystick ) -endif (CMAKE_SYSTEM_NAME MATCHES Linux) - - +if(CMAKE_SYSTEM_NAME MATCHES Linux) + # this one doesn't seem to be very portable, Alex + add_subdirectory(joystick) +endif() diff --git a/kcontrol/hardware/display/CMakeLists.txt b/kcontrol/hardware/display/CMakeLists.txt index 59174bae..040fca2e 100644 --- a/kcontrol/hardware/display/CMakeLists.txt +++ b/kcontrol/hardware/display/CMakeLists.txt @@ -1,19 +1,21 @@ - - - ########### next target ############### -set(kcm_display_PART_SRCS display.cpp ) +kde4_add_plugin(kcm_display display.cpp) +target_link_libraries(kcm_display + ${KDE4_KCMUTILS_LIBS} + ${QT_QTGUI_LIBRARY} + ${KDE4_KDEUI_LIBS} +) -kde4_add_plugin(kcm_display ${kcm_display_PART_SRCS}) - - -target_link_libraries(kcm_display ${KDE4_KCMUTILS_LIBS} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS}) - -install(TARGETS kcm_display DESTINATION ${PLUGIN_INSTALL_DIR} ) - +install( + TARGETS kcm_display + DESTINATION ${PLUGIN_INSTALL_DIR} +) ########### install files ############### -install( FILES display.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( + FILES display.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/hardware/joystick/CMakeLists.txt b/kcontrol/hardware/joystick/CMakeLists.txt index 6028a2d8..7644de04 100644 --- a/kcontrol/hardware/joystick/CMakeLists.txt +++ b/kcontrol/hardware/joystick/CMakeLists.txt @@ -1,26 +1,29 @@ - - - ########### next target ############### set(kcm_joystick_PART_SRCS - joystick.cpp - joywidget.cpp - poswidget.cpp - joydevice.cpp - caldialog.cpp ) - + joystick.cpp + joywidget.cpp + poswidget.cpp + joydevice.cpp + caldialog.cpp +) kde4_add_plugin(kcm_joystick ${kcm_joystick_PART_SRCS}) - -target_link_libraries(kcm_joystick ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY}) - -install(TARGETS kcm_joystick DESTINATION ${PLUGIN_INSTALL_DIR} ) - +target_link_libraries(kcm_joystick + ${KDE4_KDEUI_LIBS} + ${KDE4_KIO_LIBS} + ${QT_QTGUI_LIBRARY} +) ########### install files ############### -install( FILES joystick.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( + TARGETS kcm_joystick + DESTINATION ${PLUGIN_INSTALL_DIR} +) -# +install( + FILES joystick.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcontrol/icons/CMakeLists.txt b/kcontrol/icons/CMakeLists.txt index e14662c6..e794384c 100644 --- a/kcontrol/icons/CMakeLists.txt +++ b/kcontrol/icons/CMakeLists.txt @@ -4,16 +4,28 @@ endif() ########### next target ############### -set(kcm_icons_PART_SRCS iconthemes.cpp icons.cpp main.cpp) +set(kcm_icons_PART_SRCS + iconthemes.cpp + icons.cpp + main.cpp +) kde4_add_plugin(kcm_icons ${kcm_icons_PART_SRCS}) target_link_libraries(kcm_icons ${KDE4_KIO_LIBS}) -install(TARGETS kcm_icons DESTINATION ${PLUGIN_INSTALL_DIR}) - - ########### install files ############### -install(FILES icons.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(FILES icons.knsrc DESTINATION ${CONFIG_INSTALL_DIR}) +install( + TARGETS kcm_icons + DESTINATION ${PLUGIN_INSTALL_DIR} +) + +install( + FILES icons.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) +install( + FILES icons.knsrc + DESTINATION ${CONFIG_INSTALL_DIR} +) diff --git a/kcontrol/icons/tests/CMakeLists.txt b/kcontrol/icons/tests/CMakeLists.txt index 474783e2..ad77ecd9 100644 --- a/kcontrol/icons/tests/CMakeLists.txt +++ b/kcontrol/icons/tests/CMakeLists.txt @@ -1,12 +1,12 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) - -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) ########### next target ############### -set(testicons_SRCS testicons.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../icons.cpp ) + +set(testicons_SRCS + testicons.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../icons.cpp +) kde4_add_manual_test(testicons ${testicons_SRCS}) target_link_libraries(testicons ${KDE4_KDEUI_LIBS}) - - diff --git a/kcontrol/locale/CMakeLists.txt b/kcontrol/locale/CMakeLists.txt index 5b730f39..422d5d18 100644 --- a/kcontrol/locale/CMakeLists.txt +++ b/kcontrol/locale/CMakeLists.txt @@ -3,7 +3,7 @@ add_subdirectory( pics ) ########### next target ############### -set(kcm_locale_PART_SRCS kcmlocale.cpp kcmlocalewidget.ui ) +set(kcm_locale_PART_SRCS kcmlocale.cpp ) kde4_add_plugin(kcm_locale ${kcm_locale_PART_SRCS})