From d2a5236cd7dcea55337014d6f0b7627a09d8fb9f Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 31 Oct 2015 12:01:45 +0200 Subject: [PATCH] generic: build system cleanups Signed-off-by: Ivailo Monev --- kcddb/CMakeLists.txt | 15 +- kcddb/kcmcddb/CMakeLists.txt | 29 +- kcddb/libkcddb/CMakeLists.txt | 26 +- kcddb/test/CMakeLists.txt | 19 +- kcompactdisc/CMakeLists.txt | 107 +++--- kdcraw/CMakeLists.txt | 55 ++- kdcraw/icons/CMakeLists.txt | 2 +- kdcraw/libkdcraw/CMakeLists.txt | 9 +- kdcraw/profiles/CMakeLists.txt | 7 +- kdcraw/tests/CMakeLists.txt | 8 +- kdeclarative/CMakeLists.txt | 16 +- kdecore/CMakeLists.txt | 435 +++++++++++++--------- kdecore/auth/ConfigureChecks.cmake | 54 +-- kdecore/compression/ConfigureChecks.cmake | 18 +- kdecore/kconfig_compiler/CMakeLists.txt | 21 +- kdecore/network/ConfigureChecks.cmake | 26 +- kdecore/network/kssld/CMakeLists.txt | 26 +- kdecore/sonnet/tests/CMakeLists.txt | 6 +- kdecore/tests/karchivetest.cpp | 60 +-- 19 files changed, 528 insertions(+), 411 deletions(-) diff --git a/kcddb/CMakeLists.txt b/kcddb/CMakeLists.txt index 8753bd0c..cccb59ef 100644 --- a/kcddb/CMakeLists.txt +++ b/kcddb/CMakeLists.txt @@ -1,8 +1,6 @@ project(libkcddb) include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${KDE4_INCLUDES} ${KDE4_KDECORE_INCLUDES} @@ -21,9 +19,10 @@ if(MUSICBRAINZ5_FOUND) set(HAVE_MUSICBRAINZ5 1) include_directories(${MUSICBRAINZ5_INCLUDE_DIRS}) - set(libmusicbrainz_SRCS ${libmusicbrainz_SRCS} - musicbrainz/musicbrainzlookup.cpp - musicbrainz/asyncmusicbrainzlookup.cpp) + set(libmusicbrainz_SRCS + musicbrainz/musicbrainzlookup.cpp + musicbrainz/asyncmusicbrainzlookup.cpp + ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") else(MUSICBRAINZ5_FOUND) @@ -37,7 +36,7 @@ configure_file( ) if(ENABLE_TESTING) - add_subdirectory( test ) + add_subdirectory(test) endif() -add_subdirectory( kcmcddb ) -add_subdirectory( libkcddb ) +add_subdirectory(kcmcddb ) +add_subdirectory(libkcddb) diff --git a/kcddb/kcmcddb/CMakeLists.txt b/kcddb/kcmcddb/CMakeLists.txt index 5e5d3c73..55762ec5 100644 --- a/kcddb/kcmcddb/CMakeLists.txt +++ b/kcddb/kcmcddb/CMakeLists.txt @@ -1,22 +1,29 @@ - include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libkcddb ${CMAKE_CURRENT_BINARY_DIR}/../libkcddb ) -########### next target ############### - -set(kcm_cddb_PART_SRCS cddbconfigwidget.cpp kcmcddb.cpp cddbconfigwidget.ui) +set(kcm_cddb_PART_SRCS + cddbconfigwidget.cpp + kcmcddb.cpp + cddbconfigwidget.ui +) kde4_add_plugin(kcm_cddb ${kcm_cddb_PART_SRCS}) -target_link_libraries(kcm_cddb ${KDE4_KIO_LIBS} kcddb) +target_link_libraries(kcm_cddb + ${KDE4_KIO_LIBS} + kcddb +) -install(TARGETS kcm_cddb DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES libkcddb.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( + TARGETS kcm_cddb + DESTINATION ${PLUGIN_INSTALL_DIR} +) + +install( + FILES libkcddb.desktop + DESTINATION ${SERVICES_INSTALL_DIR} +) diff --git a/kcddb/libkcddb/CMakeLists.txt b/kcddb/libkcddb/CMakeLists.txt index d6c40f89..5101f25a 100644 --- a/kcddb/libkcddb/CMakeLists.txt +++ b/kcddb/libkcddb/CMakeLists.txt @@ -1,8 +1,3 @@ - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} -) - ########### next target ############### set(kcddb_LIB_SRCS ${libmusicbrainz_SRCS} @@ -35,7 +30,7 @@ set(kcddb_LIB_SRCS ${libmusicbrainz_SRCS} cdinfoencodingwidget.ui ) -kde4_add_kcfg_files(kcddb_LIB_SRCS configbase.kcfgc ) +kde4_add_kcfg_files(kcddb_LIB_SRCS configbase.kcfgc) add_library(kcddb SHARED ${kcddb_LIB_SRCS}) @@ -51,7 +46,8 @@ set_target_properties(kcddb PROPERTIES ########### install files ############### -install(FILES +install( + FILES cdinfo.h cdinfodialog.h client.h @@ -60,7 +56,17 @@ install(FILES kcddb.h kcddb_export.h ${CMAKE_CURRENT_BINARY_DIR}/configbase.h - DESTINATION ${INCLUDE_INSTALL_DIR}/libkcddb COMPONENT Devel) -install( FILES libkcddb.kcfg DESTINATION ${KCFG_INSTALL_DIR}) + DESTINATION ${INCLUDE_INSTALL_DIR}/libkcddb + COMPONENT Devel +) -install(TARGETS kcddb EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install( + FILES libkcddb.kcfg + DESTINATION ${KCFG_INSTALL_DIR} +) + +install( + TARGETS kcddb + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} +) diff --git a/kcddb/test/CMakeLists.txt b/kcddb/test/CMakeLists.txt index 9c2b17d0..7e453213 100644 --- a/kcddb/test/CMakeLists.txt +++ b/kcddb/test/CMakeLists.txt @@ -1,18 +1,27 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) - -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/../libkcddb ) +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_BINARY_DIR}/../libkcddb +) MACRO(KCDDB_EXECUTABLE_TESTS) FOREACH(_testname ${ARGN}) kde4_add_manual_test(kcddb-${_testname} ${_testname}.cpp) - target_link_libraries(kcddb-${_testname} ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} kcddb) + target_link_libraries(kcddb-${_testname} + ${KDE4_KDEUI_LIBS} + ${QT_QTTEST_LIBRARY} + kcddb + ) ENDFOREACH(_testname) ENDMACRO(KCDDB_EXECUTABLE_TESTS) MACRO(KCDDB_UNIT_TESTS) FOREACH(_testname ${ARGN}) kde4_add_test(kcddb-${_testname} ${_testname}.cpp) - target_link_libraries(kcddb-${_testname} ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} kcddb) + target_link_libraries(kcddb-${_testname} + ${KDE4_KDEUI_LIBS} + ${QT_QTTEST_LIBRARY} + kcddb + ) ENDFOREACH(_testname) ENDMACRO(KCDDB_UNIT_TESTS) diff --git a/kcompactdisc/CMakeLists.txt b/kcompactdisc/CMakeLists.txt index c0a4e3cb..82e3fecd 100644 --- a/kcompactdisc/CMakeLists.txt +++ b/kcompactdisc/CMakeLists.txt @@ -1,8 +1,6 @@ project(libkcompactdisc) include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${KDE4_INCLUDES} ${KDE4_KDECORE_INCLUDES} @@ -10,66 +8,69 @@ include_directories( ${CMAKE_SOURCE_DIR}/solid ) -## Compiler flags -if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_C_FLAGS "-std=c99") ## ALSA no longer compiles with -std=c90, see https://bugzilla.novell.com/show_bug.cgi?id=817077 -endif() find_package(Alsa) alsa_configure_file(${CMAKE_CURRENT_BINARY_DIR}/config-alsa.h) -set(wmlib_audio_SRCS - wmlib/audio/audio.c - wmlib/audio/audio_arts.c - wmlib/audio/audio_alsa.c - wmlib/audio/audio_sun.c -) - -set(wmlib_SRCS - wmlib/cdda.c - wmlib/cddb.c - wmlib/cdrom.c - wmlib/wm_helpers.c - wmlib/cdtext.c - wmlib/scsi.c - wmlib/plat_aix.c - wmlib/plat_bsd386.c - wmlib/plat_freebsd.c - wmlib/plat_hpux.c - wmlib/plat_irix.c - wmlib/plat_linux.c - wmlib/plat_svr4.c - wmlib/plat_ultrix.c - wmlib/plat_news.c - wmlib/plat_openbsd.c - wmlib/plat_osf1.c - wmlib/plat_sun.c - wmlib/plat_scor5.c - wmlib/drv_sony.c - wmlib/drv_toshiba.c -) - -if (CMAKE_SYSTEM_NAME STREQUAL GNU) - set(USE_WMLIB false) +# TODO: drop wmlib entirely? +if(CMAKE_SYSTEM_NAME STREQUAL GNU) + set(USE_WMLIB FALSE) else () - set(USE_WMLIB true) + set(USE_WMLIB TRUE) endif() -set(kcompactdisc_LIB_SRCS kcompactdisc.cpp kcompactdisc_p.cpp phonon_interface.cpp) +set(kcompactdisc_LIB_SRCS + kcompactdisc.cpp + kcompactdisc_p.cpp + phonon_interface.cpp +) -if (USE_WMLIB) - set(kcompactdisc_LIB_SRCS ${kcompactdisc_LIB_SRCS} wmlib_interface.cpp ${wmlib_SRCS} ${wmlib_audio_SRCS}) +if(USE_WMLIB) + set(kcompactdisc_LIB_SRCS + ${kcompactdisc_LIB_SRCS} + wmlib_interface.cpp + wmlib/audio/audio.c + wmlib/audio/audio_arts.c + wmlib/audio/audio_alsa.c + wmlib/audio/audio_sun.c + wmlib/cdda.c + wmlib/cddb.c + wmlib/cdrom.c + wmlib/wm_helpers.c + wmlib/cdtext.c + wmlib/scsi.c + wmlib/plat_aix.c + wmlib/plat_bsd386.c + wmlib/plat_freebsd.c + wmlib/plat_hpux.c + wmlib/plat_irix.c + wmlib/plat_linux.c + wmlib/plat_svr4.c + wmlib/plat_ultrix.c + wmlib/plat_news.c + wmlib/plat_openbsd.c + wmlib/plat_osf1.c + wmlib/plat_sun.c + wmlib/plat_scor5.c + wmlib/drv_sony.c + wmlib/drv_toshiba.c + ) add_definitions(-DUSE_WMLIB=1) -endif (USE_WMLIB) +endif(USE_WMLIB) add_library(kcompactdisc SHARED ${kcompactdisc_LIB_SRCS}) -target_link_libraries(kcompactdisc ${KDE4_KDECORE_LIBS} ${KDE4_PHONON_LIBS} ${KDE4_SOLID_LIBS}) -if (HAVE_LIBASOUND2) +target_link_libraries(kcompactdisc + ${KDE4_KDECORE_LIBS} + ${KDE4_PHONON_LIBS} + ${KDE4_SOLID_LIBS} +) + +if(HAVE_LIBASOUND2) target_link_libraries(kcompactdisc ${ASOUND_LIBRARY}) endif(HAVE_LIBASOUND2) if (USE_WMLIB) target_link_libraries(kcompactdisc ${CMAKE_THREAD_LIBS_INIT}) -endif (USE_WMLIB) +endif(USE_WMLIB) set_target_properties(kcompactdisc PROPERTIES VERSION ${GENERIC_LIB_VERSION} @@ -78,6 +79,14 @@ set_target_properties(kcompactdisc PROPERTIES ########### install files ############### -install(FILES kcompactdisc.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkcompactdisc COMPONENT Devel) +install( + FILES kcompactdisc.h + DESTINATION ${INCLUDE_INSTALL_DIR}/libkcompactdisc + COMPONENT Devel +) -install(TARGETS kcompactdisc EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install( + TARGETS kcompactdisc + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} +) diff --git a/kdcraw/CMakeLists.txt b/kdcraw/CMakeLists.txt index 39836302..235758f0 100644 --- a/kdcraw/CMakeLists.txt +++ b/kdcraw/CMakeLists.txt @@ -24,24 +24,16 @@ PROJECT(libkdcraw) -INCLUDE(MacroLibrary) -INCLUDE(MacroOptionalAddSubdirectory) -INCLUDE(FindPackageHandleStandardArgs) -INCLUDE(CMakePackageConfigHelpers) - # NOTE: Libraw 0.16.x is prefered version to use because it's ported to Cmake # with full features supported. Until libraw 0.16.0 is release (ends of 2013), # we will support previous version (with limited support) -FIND_PACKAGE(LibRaw 0.15) +FIND_PACKAGE(LibRaw VERSION 0.15 REQUIRED) SET_PACKAGE_PROPERTIES(LibRaw PROPERTIES DESCRIPTION "library that provides image Raw file demosaicing" URL "http://www.libraw.org" TYPE REQUIRED PURPOSE "Required to build libkdcraw" ) -IF(NOT LIBRAW_FOUND) - RETURN() -ENDIF() # Check LibRaw config header. MESSAGE(STATUS "LibRaw version: ${LibRaw_VERSION_STRING}") @@ -53,26 +45,22 @@ ELSE() MESSAGE(STATUS "LibRaw config file exists: no") ENDIF() -ADD_DEFINITIONS(${QT_DEFINITIONS} - ${QT_QTDBUS_DEFINITIONS} - ${KDE4_DEFINITIONS} - ${LibRaw_r_DEFINITIONS} - ) +ADD_DEFINITIONS( + ${QT_QTDBUS_DEFINITIONS} + ${LibRaw_r_DEFINITIONS} + -DKDE_DEFAULT_DEBUG_AREA=51002 +) -INCLUDE_DIRECTORIES(${QDBUS_INCLUDE_DIRS} - ${CMAKE_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${KDE4_INCLUDES} - ${CMAKE_SOURCE_DIR}/threadweaver - ${CMAKE_SOURCE_DIR}/solid - ${CMAKE_BINARY_DIR}/solid - ${KDE4_KDECORE_INCLUDES} - ${KDE4_KIO_INCLUDES} - ${LibRaw_INCLUDE_DIR} - ) - -SET(LIBKDCRAW_AREA_CODE_GENERAL 51002) -ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=${LIBKDCRAW_AREA_CODE_GENERAL}) +INCLUDE_DIRECTORIES( + ${QDBUS_INCLUDE_DIRS} + ${KDE4_INCLUDES} + ${CMAKE_SOURCE_DIR}/threadweaver + ${CMAKE_SOURCE_DIR}/solid + ${CMAKE_BINARY_DIR}/solid + ${KDE4_KDECORE_INCLUDES} + ${KDE4_KIO_INCLUDES} + ${LibRaw_INCLUDE_DIR} +) # ================================================================================================== # Set env. variables accordinly. @@ -91,6 +79,13 @@ IF(ENABLE_TESTING) ADD_SUBDIRECTORY(tests) ENDIF() -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libkdcraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/libkdcraw.pc.cmake + ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc +) +INSTALL( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw.pc + DESTINATION ${LIB_INSTALL_DIR}/pkgconfig +) diff --git a/kdcraw/icons/CMakeLists.txt b/kdcraw/icons/CMakeLists.txt index 75795cce..58a2de19 100644 --- a/kdcraw/icons/CMakeLists.txt +++ b/kdcraw/icons/CMakeLists.txt @@ -22,4 +22,4 @@ # # ============================================================ -kde4_install_icons ( ${ICON_INSTALL_DIR} ) +kde4_install_icons(${ICON_INSTALL_DIR}) diff --git a/kdcraw/libkdcraw/CMakeLists.txt b/kdcraw/libkdcraw/CMakeLists.txt index f3979ff4..6952fd92 100644 --- a/kdcraw/libkdcraw/CMakeLists.txt +++ b/kdcraw/libkdcraw/CMakeLists.txt @@ -61,9 +61,14 @@ set_target_properties(kdcraw PROPERTIES SOVERSION ${GENERIC_LIB_SOVERSION} ) -install(TARGETS kdcraw EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install( + TARGETS kdcraw + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} +) -install(FILES +install( + FILES rawdecodingsettings.h kdcraw.h dcrawsettingswidget.h diff --git a/kdcraw/profiles/CMakeLists.txt b/kdcraw/profiles/CMakeLists.txt index d06b2d40..bf0124e0 100644 --- a/kdcraw/profiles/CMakeLists.txt +++ b/kdcraw/profiles/CMakeLists.txt @@ -24,5 +24,8 @@ FILE(GLOB icmfiles *.icm *.icc) -INSTALL(FILES ${icmfiles} - DESTINATION ${DATA_INSTALL_DIR}/libkdcraw/profiles ) +INSTALL( + FILES + ${icmfiles} + DESTINATION ${DATA_INSTALL_DIR}/libkdcraw/profiles +) diff --git a/kdcraw/tests/CMakeLists.txt b/kdcraw/tests/CMakeLists.txt index 3b776869..7819222a 100644 --- a/kdcraw/tests/CMakeLists.txt +++ b/kdcraw/tests/CMakeLists.txt @@ -24,10 +24,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libkdcraw) -SET(raw2png_SRCS raw2png.cpp) -ADD_EXECUTABLE(raw2png ${raw2png_SRCS}) -TARGET_LINK_LIBRARIES(raw2png kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) +KDE4_ADD_MANUAL_TESTS(kdcraw-raw2png raw2png.cpp) +TARGET_LINK_LIBRARIES(kdcraw-raw2png kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) -SET(libinfo_SRCS libinfo.cpp) -ADD_EXECUTABLE(libinfo ${libinfo_SRCS}) +KDE4_ADD_MANUAL_TESTS(kdcraw-libinfo libinfo.cpp) TARGET_LINK_LIBRARIES(libinfo kdcraw ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) diff --git a/kdeclarative/CMakeLists.txt b/kdeclarative/CMakeLists.txt index 7584b988..c1d81cb5 100644 --- a/kdeclarative/CMakeLists.txt +++ b/kdeclarative/CMakeLists.txt @@ -44,10 +44,16 @@ if(ENABLE_TESTING) add_subdirectory(tests) endif() -set(kdeclarative_LIB_HEADERS +install( + FILES kdeclarative.h - kdeclarative_export.h) + kdeclarative_export.h + DESTINATION ${INCLUDE_INSTALL_DIR} + COMPONENT Devel +) -install(FILES ${kdeclarative_LIB_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/ COMPONENT Devel) - -install(TARGETS kdeclarative EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install( + TARGETS kdeclarative + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} +) diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt index 79645eae..d57bb7ea 100644 --- a/kdecore/CMakeLists.txt +++ b/kdecore/CMakeLists.txt @@ -1,13 +1,22 @@ project(kdecore) # Generate config-kstandarddirs.h -configure_file(config-kstandarddirs.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kstandarddirs.h ) +configure_file( + config-kstandarddirs.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config-kstandarddirs.h +) # Generate kdefakes.h -configure_file(kdefakes.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h ) +configure_file( + kdefakes.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h +) # Generate kdeversion.h -configure_file(util/kdeversion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h ) +configure_file( + util/kdeversion.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h +) # Configure checks for kdirwatch macro_optional_find_package(FAM) @@ -17,43 +26,66 @@ check_include_files(sys/inotify.h SYS_INOTIFY_H_FOUND) macro_bool_to_01(SYS_INOTIFY_H_FOUND HAVE_SYS_INOTIFY_H) # Generate io/config-kdirwatch.h -configure_file(io/config-kdirwatch.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/io/config-kdirwatch.h ) +configure_file( + io/config-kdirwatch.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/io/config-kdirwatch.h +) # Configure checks for network/ but also for netsupp.* include(network/ConfigureChecks.cmake) -configure_file(network/config-network.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/network/config-network.h ) -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/network ) +configure_file( + network/config-network.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/network/config-network.h +) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/network) # Configure checks for date/ include(date/ConfigureChecks.cmake) -configure_file(date/config-date.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/date/config-date.h) -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/date ) +configure_file( + date/config-date.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/date/config-date.h +) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/date) # Configure checks for compression/ include(compression/ConfigureChecks.cmake) -configure_file(compression/config-compression.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/compression/config-compression.h) -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/compression ) +configure_file( + compression/config-compression.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/compression/config-compression.h +) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/compression) # This file handles all the logic for compiling KAuth's backends include(auth/ConfigureChecks.cmake) -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/auth/ ) # Configure a small file to tell BackendsManager what to use -configure_file(auth/BackendsConfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/BackendsConfig.h) +configure_file( + auth/BackendsConfig.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/BackendsConfig.h +) # Configure checks for localization -configure_file(localization/config-localization.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-localization.h) +configure_file( + localization/config-localization.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config-localization.h +) # Configure checks for util include(util/ConfigureChecks.cmake) -configure_file(util/config-util.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-util.h) +configure_file( + util/config-util.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config-util.h +) -include_directories( ${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES}) -include_directories( ${ZLIB_INCLUDE_DIR} ) -include_directories( ${QT_INCLUDES} ) - -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/sonnet/ ) +include_directories( + ${KDE4_KDECORE_INCLUDES} + ${KDE4_KDEUI_INCLUDES} + ${ZLIB_INCLUDE_DIR} + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR}/auth + ${CMAKE_CURRENT_SOURCE_DIR}/sonnet +) # kdecore_OPTIONAL_SRCS is used to collect source files # which are not always compiled into kdecore @@ -66,52 +98,55 @@ add_definitions(-DQT_NO_CAST_FROM_ASCII) # Needed for the kdatetime test in release mode if(ENABLE_TESTING) - add_definitions(-DCOMPILING_TESTS) + add_definitions(-DCOMPILING_TESTS) endif(ENABLE_TESTING) # compile bzip2 support if available if(BZIP2_FOUND) - include_directories(${BZIP2_INCLUDE_DIR}) - set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} compression/kbzip2filter.cpp ) - set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${BZIP2_LIBRARIES}) + include_directories(${BZIP2_INCLUDE_DIR}) + set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} compression/kbzip2filter.cpp) + set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${BZIP2_LIBRARIES}) endif(BZIP2_FOUND) # compile lzma support if available if(LIBLZMA_FOUND) - include_directories(${LIBLZMA_INCLUDE_DIRS}) - set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} compression/kxzfilter.cpp ) - set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBLZMA_LIBRARIES}) + include_directories(${LIBLZMA_INCLUDE_DIRS}) + set(kdecore_OPTIONAL_SRCS ${kdecore_OPTIONAL_SRCS} compression/kxzfilter.cpp) + set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBLZMA_LIBRARIES}) endif(LIBLZMA_FOUND) # compile Gettext support if available if(LIBINTL_FOUND) - include_directories(${LIBINTL_INCLUDE_DIR}) - set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBINTL_LIBRARIES}) -endif(LIBINTL_FOUND) - -if (HAVE_RESOLV_LIBRARY) - set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} resolv) -endif (HAVE_RESOLV_LIBRARY) - -add_subdirectory( kconfig_compiler ) -if(ENABLE_TESTING) - add_subdirectory( tests ) - add_subdirectory( sonnet/tests ) + include_directories(${LIBINTL_INCLUDE_DIR}) + set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${LIBINTL_LIBRARIES}) endif() -add_subdirectory( network/kssld ) + +if(HAVE_RESOLV_LIBRARY) + set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} resolv) +endif() + +add_subdirectory(kconfig_compiler) +if(ENABLE_TESTING) + add_subdirectory(tests) + add_subdirectory(sonnet/tests) +endif() +add_subdirectory(network/kssld) ########### next target ############### add_library(kdefakes ${LIBRARY_TYPE} fakes.c) set_target_properties(kdefakes PROPERTIES VERSION ${KDE_NON_GENERIC_LIB_VERSION} - SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION}) -if (NOT HAVE_TRUNC) + SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION} +) +if(NOT HAVE_TRUNC) target_link_libraries(kdefakes m ) -endif (NOT HAVE_TRUNC) +endif() -install(TARGETS kdefakes - EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} +install( + TARGETS kdefakes + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} ) ########### next target ############### @@ -281,9 +316,9 @@ set_source_files_properties(util/kshareddatacache.cpp PROPERTIES COMPILE_FLAGS "${KDE4_ENABLE_EXCEPTIONS}" ) -if (NOT Q_WS_X11 AND NOT Q_WS_QWS) - add_definitions(-DNO_DISPLAY) -endif (NOT Q_WS_X11 AND NOT Q_WS_QWS) +if(NOT Q_WS_X11 AND NOT Q_WS_QWS) + add_definitions(-DNO_DISPLAY) +endif() add_library(kdecore ${LIBRARY_TYPE} ${kdecore_LIB_SRCS}) @@ -299,17 +334,19 @@ target_link_libraries(kdecore PRIVATE set(SYS_INOTIFY_H_FOUND 0) if(SYS_INOTIFY_H_FOUND) - set_package_properties(FAM PROPERTIES DESCRIPTION "File alteration notification support via a separate service" - URL "http://oss.sgi.com/projects/fam" - TYPE OPTIONAL - PURPOSE "You have file alteration notification support built into your kernel, however you might consider installing FAM as it also supports NFS." - ) + set_package_properties(FAM PROPERTIES + DESCRIPTION "File alteration notification support via a separate service" + URL "http://oss.sgi.com/projects/fam" + TYPE OPTIONAL + PURPOSE "You have file alteration notification support built into your kernel, however you might consider installing FAM as it also supports NFS." + ) else(SYS_INOTIFY_H_FOUND) - set_package_properties(FAM PROPERTIES DESCRIPTION "File alteration notification support via a separate service" - URL "http://oss.sgi.com/projects/fam" - TYPE OPTIONAL - PURPOSE "Provides file alteration notification facilities using a separate service." - ) + set_package_properties(FAM PROPERTIES + DESCRIPTION "File alteration notification support via a separate service" + URL "http://oss.sgi.com/projects/fam" + TYPE OPTIONAL + PURPOSE "Provides file alteration notification facilities using a separate service." + ) endif(SYS_INOTIFY_H_FOUND) if(FAM_FOUND) @@ -317,15 +354,22 @@ if(FAM_FOUND) target_link_libraries(kdecore PRIVATE ${FAM_LIBRARIES}) endif(FAM_FOUND) -target_link_libraries(kdecore PUBLIC ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ) +target_link_libraries(kdecore PUBLIC + ${QT_QTDBUS_LIBRARY} + ${QT_QTCORE_LIBRARY} +) set_target_properties(kdecore PROPERTIES - VERSION ${GENERIC_LIB_VERSION} - SOVERSION ${GENERIC_LIB_SOVERSION} - ) + VERSION ${GENERIC_LIB_VERSION} + SOVERSION ${GENERIC_LIB_SOVERSION} +) -install(TARGETS kdecore EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) +install( + TARGETS kdecore + EXPORT kdelibsLibraryTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} +) ########### next target ############### @@ -334,10 +378,11 @@ install(TARGETS kdecore EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_A set(KAUTH_BACKEND_SRCS ${KAUTH_BACKEND_SRCS} auth/AuthBackend.cpp) kde4_add_plugin(kauth_backend_plugin ${KAUTH_BACKEND_SRCS}) target_link_libraries(kauth_backend_plugin ${KAUTH_BACKEND_LIBS}) -install(TARGETS kauth_backend_plugin - LIBRARY DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} - ARCHIVE DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} - RUNTIME DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} +install( + TARGETS kauth_backend_plugin + LIBRARY DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} + ARCHIVE DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} + RUNTIME DESTINATION ${KAUTH_BACKEND_PLUGIN_DIR} ) ########### next target ############### @@ -346,141 +391,163 @@ install(TARGETS kauth_backend_plugin kde4_add_plugin(kauth_helper_plugin ${KAUTH_HELPER_BACKEND_SRCS} auth/HelperProxy.cpp) target_link_libraries(kauth_helper_plugin ${KAUTH_HELPER_BACKEND_LIBS}) -install(TARGETS kauth_helper_plugin - LIBRARY DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} - ARCHIVE DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} - RUNTIME DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} +install( + TARGETS kauth_helper_plugin + LIBRARY DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} + ARCHIVE DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} + RUNTIME DESTINATION ${KAUTH_HELPER_PLUGIN_DIR} ) ########### next target ############### -configure_file(localization/all_languages.desktop ${CMAKE_CURRENT_BINARY_DIR}/all_languages @ONLY) +configure_file( + localization/all_languages.desktop + ${CMAKE_CURRENT_BINARY_DIR}/all_languages + @ONLY +) add_executable(kde4-config kde-config.cpp ) target_link_libraries(kde4-config ${KDE4_KDECORE_LIBS}) -install(TARGETS kde4-config ${INSTALL_TARGETS_DEFAULT_ARGS} ) +install(TARGETS kde4-config ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### next target ############### ########### install files ############### -install( FILES ${CMAKE_CURRENT_BINARY_DIR}/all_languages DESTINATION ${LOCALE_INSTALL_DIR} ) -install( FILES localization/entry.desktop DESTINATION ${LOCALE_INSTALL_DIR}/en_US ) -install( FILES kdebug.areas kdebugrc DESTINATION ${CONFIG_INSTALL_DIR} ) -install( FILES - kdecore_export.h - compression/kfilterbase.h - compression/karchive_export.h - compression/kfilterdev.h - config/conversion_check.h - config/kconfig.h - #config/kconfigbackend.h re-enable post-API review and implementation (4.2?) - config/kconfigbase.h - config/kconfiggroup.h - config/kdesktopfile.h - config/ksharedconfig.h - config/kcoreconfigskeleton.h - date/kcalendarsystem.h - date/kdatetime.h - date/klocalizeddate.h - date/ksystemtimezone.h - date/ktimezone.h - date/ktzfiletimezone.h - io/kar.h - io/karchive.h - io/kautosavefile.h - io/kdebug.h - io/kdirwatch.h - io/kmessage.h - io/kprocess.h - io/klockfile.h - io/kmountpoint.h - io/ksavefile.h - io/ktar.h - io/ktempdir.h - io/ktemporaryfile.h - io/kurl.h - io/kzip.h - jobs/kcompositejob.h - jobs/kjob.h - jobs/kjobuidelegate.h - jobs/kjobtrackerinterface.h - kernel/kaboutdata.h - kernel/kauthorized.h - kernel/kcmdlineargs.h - kernel/kdbusconnectionpool.h - kernel/kglobal.h - kernel/kcomponentdata.h - kernel/kstandarddirs.h - kernel/ktoolinvocation.h - DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel + +install( + FILES + localization/entry.desktop + ${CMAKE_CURRENT_BINARY_DIR}/all_languages + DESTINATION ${LOCALE_INSTALL_DIR}/en_US ) -install(FILES - network/klocalsocket.h - network/ksocketfactory.h - network/ktcpsocket.h - auth/kauthaction.h - auth/kauthactionreply.h - auth/kauthactionwatcher.h - auth/kauthhelpersupport.h - auth/kauth.h - services/kmimetype.h - services/kmimetypetrader.h - services/kservice.h - services/kserviceaction.h - services/kservicegroup.h - #services/kservicefactory.h: do not install, internal API - services/kservicetype.h - #services/kservicetypefactory.h: do not install, internal API - services/kservicetypeprofile.h - services/kservicetypetrader.h - #services/kserviceoffer.h: do not install, internal API - services/kplugininfo.h - localization/kcharsets.h - localization/kcurrencycode.h - localization/kencodingdetector.h - localization/klocale.h - localization/klocalizedstring.h - sycoca/kprotocolinfo.h - sycoca/ksycoca.h - sycoca/ksycocaentry.h - sycoca/ksycocatype.h - text/kascii.h - text/kcodecs.h - text/kstringhandler.h - util/kallocator.h - util/kautostart.h - util/kde_file.h - util/kdedmodule.h - util/klauncher_iface.h - util/klibrary.h - util/kmacroexpander.h - util/kexportplugin.h - util/kpluginfactory.h - util/kpluginloader.h - util/kshell.h - util/krandom.h - util/krandomsequence.h - util/kshareddatacache.h - util/ksharedptr.h - util/ksortablelist.h - util/kuser.h - util/qtest_kde.h - ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h - ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h - DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel +install( + FILES + kdebug.areas + kdebugrc + DESTINATION ${CONFIG_INSTALL_DIR} ) -install( FILES sonnet/backgroundchecker.h sonnet/speller.h sonnet/globals.h - DESTINATION ${INCLUDE_INSTALL_DIR}/sonnet COMPONENT Devel) - -install( FILES - config/kconfigbackend.desktop - services/kplugininfo.desktop - sonnet/sonnetspeller.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR} +install( + FILES + kdecore_export.h + compression/kfilterbase.h + compression/karchive_export.h + compression/kfilterdev.h + config/conversion_check.h + config/kconfig.h + #config/kconfigbackend.h re-enable post-API review and implementation (4.2?) + config/kconfigbase.h + config/kconfiggroup.h + config/kdesktopfile.h + config/ksharedconfig.h + config/kcoreconfigskeleton.h + date/kcalendarsystem.h + date/kdatetime.h + date/klocalizeddate.h + date/ksystemtimezone.h + date/ktimezone.h + date/ktzfiletimezone.h + io/kar.h + io/karchive.h + io/kautosavefile.h + io/kdebug.h + io/kdirwatch.h + io/kmessage.h + io/kprocess.h + io/klockfile.h + io/kmountpoint.h + io/ksavefile.h + io/ktar.h + io/ktempdir.h + io/ktemporaryfile.h + io/kurl.h + io/kzip.h + jobs/kcompositejob.h + jobs/kjob.h + jobs/kjobuidelegate.h + jobs/kjobtrackerinterface.h + kernel/kaboutdata.h + kernel/kauthorized.h + kernel/kcmdlineargs.h + kernel/kdbusconnectionpool.h + kernel/kglobal.h + kernel/kcomponentdata.h + kernel/kstandarddirs.h + kernel/ktoolinvocation.h + network/klocalsocket.h + network/ksocketfactory.h + network/ktcpsocket.h + auth/kauthaction.h + auth/kauthactionreply.h + auth/kauthactionwatcher.h + auth/kauthhelpersupport.h + auth/kauth.h + services/kmimetype.h + services/kmimetypetrader.h + services/kservice.h + services/kserviceaction.h + services/kservicegroup.h + #services/kservicefactory.h: do not install, internal API + services/kservicetype.h + #services/kservicetypefactory.h: do not install, internal API + services/kservicetypeprofile.h + services/kservicetypetrader.h + #services/kserviceoffer.h: do not install, internal API + services/kplugininfo.h + localization/kcharsets.h + localization/kcurrencycode.h + localization/kencodingdetector.h + localization/klocale.h + localization/klocalizedstring.h + sycoca/kprotocolinfo.h + sycoca/ksycoca.h + sycoca/ksycocaentry.h + sycoca/ksycocatype.h + text/kascii.h + text/kcodecs.h + text/kstringhandler.h + util/kallocator.h + util/kautostart.h + util/kde_file.h + util/kdedmodule.h + util/klauncher_iface.h + util/klibrary.h + util/kmacroexpander.h + util/kexportplugin.h + util/kpluginfactory.h + util/kpluginloader.h + util/kshell.h + util/krandom.h + util/krandomsequence.h + util/kshareddatacache.h + util/ksharedptr.h + util/ksortablelist.h + util/kuser.h + util/qtest_kde.h + ${CMAKE_CURRENT_BINARY_DIR}/kdefakes.h + ${CMAKE_CURRENT_BINARY_DIR}/kdeversion.h + DESTINATION ${INCLUDE_INSTALL_DIR} + COMPONENT Devel +) + +install( + FILES + sonnet/backgroundchecker.h + sonnet/speller.h + sonnet/globals.h + DESTINATION ${INCLUDE_INSTALL_DIR}/sonnet + COMPONENT Devel +) + +install( + FILES + config/kconfigbackend.desktop + services/kplugininfo.desktop + sonnet/sonnetspeller.desktop + DESTINATION ${SERVICETYPES_INSTALL_DIR} ) diff --git a/kdecore/auth/ConfigureChecks.cmake b/kdecore/auth/ConfigureChecks.cmake index c252052d..16687c2a 100644 --- a/kdecore/auth/ConfigureChecks.cmake +++ b/kdecore/auth/ConfigureChecks.cmake @@ -1,38 +1,44 @@ ######################## # Helper backend probing -set(KAUTH_BACKEND "DBus" CACHE STRING "Specifies the KAuth helper backend to build. Current available options are - DBus. Not setting this variable will build the most appropriate backend for your system") +# not much of a choice really +set(KAUTH_BACKEND "DBus") # Add the correct libraries/files depending on the backend -if (KAUTH_BACKEND STREQUAL "DBus") - set(KAUTH_COMPILING_DBUS_HELPER_BACKEND TRUE) - set(KDE4_AUTH_HELPER_BACKEND_NAME "DBUS") - set(KDE4_AUTH_BACKEND_NAME "DBUS") - set(KAUTH_BACKEND_SRCS +if(KAUTH_BACKEND STREQUAL "DBus") + set(KAUTH_COMPILING_DBUS_HELPER_BACKEND TRUE) + set(KDE4_AUTH_HELPER_BACKEND_NAME "DBUS") + set(KDE4_AUTH_BACKEND_NAME "DBUS") + set(KAUTH_BACKEND_SRCS auth/backends/dbus/DBusBackend.cpp auth/backends/dbus/DBusBackend.h - ) - set(KAUTH_BACKEND_LIBS ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}) + ) + set(KAUTH_BACKEND_LIBS ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}) - qt4_add_dbus_adaptor(kauth_dbus_adaptor_SRCS - auth/backends/dbus/org.kde.auth.xml - auth/backends/dbus/DBusHelperProxy.h - KAuth::DBusHelperProxy) + qt4_add_dbus_adaptor(kauth_dbus_adaptor_SRCS + auth/backends/dbus/org.kde.auth.xml + auth/backends/dbus/DBusHelperProxy.h + KAuth::DBusHelperProxy + ) - set(KAUTH_HELPER_BACKEND_SRCS + set(KAUTH_HELPER_BACKEND_SRCS auth/backends/dbus/DBusHelperProxy.cpp ${kauth_dbus_adaptor_SRCS} - ) - set(KAUTH_HELPER_BACKEND_LIBS kdecore) + ) + set(KAUTH_HELPER_BACKEND_LIBS kdecore) - # Install some files as well - install( FILES auth/backends/dbus/org.kde.auth.conf - DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d ) + # Install some files as well + install( + FILES + auth/backends/dbus/org.kde.auth.conf + DESTINATION ${SYSCONF_INSTALL_DIR}/dbus-1/system.d + ) - install( FILES auth/backends/dbus/dbus_policy.stub - auth/backends/dbus/dbus_service.stub - DESTINATION ${DATA_INSTALL_DIR}/kauth COMPONENT Devel) + install( + FILES + auth/backends/dbus/dbus_policy.stub + auth/backends/dbus/dbus_service.stub + DESTINATION ${DATA_INSTALL_DIR}/kauth + COMPONENT Devel + ) endif() - -## End diff --git a/kdecore/compression/ConfigureChecks.cmake b/kdecore/compression/ConfigureChecks.cmake index 9e00a236..fc21c794 100644 --- a/kdecore/compression/ConfigureChecks.cmake +++ b/kdecore/compression/ConfigureChecks.cmake @@ -1,14 +1,16 @@ macro_optional_find_package(BZip2) -set_package_properties(BZip2 PROPERTIES DESCRIPTION "Support for BZip2 compressed files and data streams" - URL "http://www.bzip.org" - TYPE RECOMMENDED - ) +set_package_properties(BZip2 PROPERTIES + DESCRIPTION "Support for BZip2 compressed files and data streams" + URL "http://www.bzip.org" + TYPE RECOMMENDED +) macro_optional_find_package(LibLZMA) -set_package_properties(LibLZMA PROPERTIES DESCRIPTION "Support for xz compressed files and data streams" - URL "http://tukaani.org/xz/" - TYPE OPTIONAL - ) +set_package_properties(LibLZMA PROPERTIES + DESCRIPTION "Support for xz compressed files and data streams" + URL "http://tukaani.org/xz/" + TYPE OPTIONAL +) macro_bool_to_01(BZIP2_FOUND HAVE_BZIP2_SUPPORT) if(BZIP2_FOUND AND BZIP2_NEED_PREFIX) diff --git a/kdecore/kconfig_compiler/CMakeLists.txt b/kdecore/kconfig_compiler/CMakeLists.txt index d738a84b..f581ea7a 100644 --- a/kdecore/kconfig_compiler/CMakeLists.txt +++ b/kdecore/kconfig_compiler/CMakeLists.txt @@ -1,13 +1,12 @@ +add_executable(kconfig_compiler kconfig_compiler.cpp) -set(kconfig_compiler_SRCS kconfig_compiler.cpp) - -add_executable(kconfig_compiler ${kconfig_compiler_SRCS}) - -target_link_libraries(kconfig_compiler ${QT_QTCORE_LIBRARY} ${QT_QTXML_LIBRARY}) - -# "export" this target too so we can use the LOCATION property of the imported -# target in # FindKDE4Internal.cmake to get the full path to the installed -# executable instead of using FIND_PROGRAM(), Alex -install(TARGETS kconfig_compiler - EXPORT kdelibsToolsTargets ${INSTALL_TARGETS_DEFAULT_ARGS} +target_link_libraries(kconfig_compiler + ${QT_QTCORE_LIBRARY} + ${QT_QTXML_LIBRARY} +) + +install( + TARGETS kconfig_compiler + EXPORT kdelibsToolsTargets + ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff --git a/kdecore/network/ConfigureChecks.cmake b/kdecore/network/ConfigureChecks.cmake index 11cefd2d..24a3dbe2 100644 --- a/kdecore/network/ConfigureChecks.cmake +++ b/kdecore/network/ConfigureChecks.cmake @@ -10,23 +10,25 @@ include(CheckStructMember) if(KATIE_FOUND) set(HAVE_QSSLSOCKET TRUE) else() -macro_push_required_vars() - set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}") - message(STATUS ${QT_INCLUDE_DIR}) - if (QT_USE_FRAMEWORKS) - set(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") - endif (QT_USE_FRAMEWORKS) - check_cxx_source_compiles( + macro_push_required_vars() + set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}") + message(STATUS ${QT_INCLUDE_DIR}) + if (QT_USE_FRAMEWORKS) + set(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") + endif (QT_USE_FRAMEWORKS) + check_cxx_source_compiles( "#include int main() { QSslSocket *socket; return 0; -}" HAVE_QSSLSOCKET) - if (NOT HAVE_QSSLSOCKET) - message(SEND_ERROR "KDE Requires Qt to be built with SSL support") - endif (NOT HAVE_QSSLSOCKET) -macro_pop_required_vars() +}" HAVE_QSSLSOCKET + ) + + if (NOT HAVE_QSSLSOCKET) + message(SEND_ERROR "KDE Requires Qt to be built with SSL support") + endif() + macro_pop_required_vars() endif(KATIE_FOUND) check_include_files("sys/types.h;sys/socket.h;net/if.h" HAVE_NET_IF_H) diff --git a/kdecore/network/kssld/CMakeLists.txt b/kdecore/network/kssld/CMakeLists.txt index 000b05c6..9835bf2f 100644 --- a/kdecore/network/kssld/CMakeLists.txt +++ b/kdecore/network/kssld/CMakeLists.txt @@ -1,19 +1,19 @@ +kde4_add_plugin(kded_kssld kssld.cpp) -########### next target ############### +target_link_libraries(kded_kssld + ${KDE4_KDECORE_LIBS} + ${QT_QTNETWORK_LIBRARY} +) -set(kded_kssld_PART_SRCS kssld.cpp ) +install( + TARGETS kded_kssld + DESTINATION ${PLUGIN_INSTALL_DIR} +) - -kde4_add_plugin(kded_kssld ${kded_kssld_PART_SRCS}) - -target_link_libraries(kded_kssld ${KDE4_KDECORE_LIBS} ${QT_QTNETWORK_LIBRARY} ) - -install(TARGETS kded_kssld DESTINATION ${PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES kssld.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) +install( + FILES kssld.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/kded +) diff --git a/kdecore/sonnet/tests/CMakeLists.txt b/kdecore/sonnet/tests/CMakeLists.txt index 308db579..5de3ea18 100644 --- a/kdecore/sonnet/tests/CMakeLists.txt +++ b/kdecore/sonnet/tests/CMakeLists.txt @@ -14,7 +14,11 @@ target_link_libraries(test_suggest ${KDE4_KDECORE_LIBS} ) MACRO(SONNET_UNIT_TESTS) FOREACH(_testname ${ARGN}) kde4_add_test(sonnet-${_testname} ${_testname}.cpp) - target_link_libraries(sonnet-${_testname} ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEWIN_LIBRARIES}) + target_link_libraries(sonnet-${_testname} + ${KDE4_KDECORE_LIBS} + ${QT_QTTEST_LIBRARY} + ${QT_QTXML_LIBRARY} + ) ENDFOREACH(_testname) ENDMACRO(SONNET_UNIT_TESTS) diff --git a/kdecore/tests/karchivetest.cpp b/kdecore/tests/karchivetest.cpp index c1833d2c..78f13449 100644 --- a/kdecore/tests/karchivetest.cpp +++ b/kdecore/tests/karchivetest.cpp @@ -361,42 +361,42 @@ void KArchiveTest::testReadTar() // testCreateTarGz must have been run first. // used when writing. QBENCHMARK { - KTar tar( fileName ); + KTar tar( fileName ); - QVERIFY( tar.open( QIODevice::ReadOnly ) ); + QVERIFY( tar.open( QIODevice::ReadOnly ) ); - const KArchiveDirectory* dir = tar.directory(); - QVERIFY( dir != 0 ); - const QStringList listing = recursiveListEntries( dir, "", WithUserGroup ); + const KArchiveDirectory* dir = tar.directory(); + QVERIFY( dir != 0 ); + const QStringList listing = recursiveListEntries( dir, "", WithUserGroup ); - QFileInfo localFileData("test3"); + QFileInfo localFileData("test3"); - const QString owner = localFileData.owner(); - const QString group = localFileData.group(); + const QString owner = localFileData.owner(); + const QString group = localFileData.group(); - QCOMPARE( listing.count(), 15 ); - QCOMPARE( listing[ 0], QString("mode=40755 user=user group=group path=aaaemptydir type=dir") ); - QCOMPARE( listing[ 1], QString("mode=40777 user=%1 group=%2 path=dir type=dir").arg(owner, group) ); - QCOMPARE( listing[ 2], QString("mode=40777 user=%1 group=%2 path=dir/subdir type=dir").arg(owner,group) ); - QCOMPARE( listing[ 3], QString("mode=100644 user=user group=group path=dir/subdir/mediumfile2 type=file size=100") ); - QCOMPARE( listing[ 4], QString("mode=100644 user=weis group=users path=empty type=file size=0") ); - QCOMPARE( listing[ 5], QString("mode=100644 user=user group=group path=hugefile type=file size=20000") ); - QCOMPARE( listing[ 6], QString("mode=100644 user=user group=group path=mediumfile type=file size=100") ); - QCOMPARE( listing[ 7], QString("mode=40777 user=%1 group=%2 path=my type=dir").arg(owner, group) ); - QCOMPARE( listing[ 8], QString("mode=40777 user=%1 group=%2 path=my/dir type=dir").arg(owner, group) ); - QCOMPARE( listing[ 9], QString("mode=100644 user=dfaure group=hackers path=my/dir/test3 type=file size=29") ); - QCOMPARE( listing[10], QString("mode=100440 user=weis group=users path=test1 type=file size=5") ); - QCOMPARE( listing[11], QString("mode=100644 user=weis group=users path=test2 type=file size=8") ); - QCOMPARE( listing[12], QString("mode=40777 user=%1 group=%2 path=z type=dir").arg(owner, group) ); - // This one was added with addLocalFile, so ignore mode/user/group. - QString str = listing[13]; - str.replace(QRegExp("mode.*path"), "path" ); - QCOMPARE( str, QString("path=z/test3 type=file size=13") ); - str = listing[14]; - str.replace(QRegExp("mode.*path"), "path" ); - QCOMPARE( str, QString("path=z/test3_symlink type=file size=0 symlink=test3") ); + QCOMPARE( listing.count(), 15 ); + QCOMPARE( listing[ 0], QString("mode=40755 user=user group=group path=aaaemptydir type=dir") ); + QCOMPARE( listing[ 1], QString("mode=40777 user=%1 group=%2 path=dir type=dir").arg(owner, group) ); + QCOMPARE( listing[ 2], QString("mode=40777 user=%1 group=%2 path=dir/subdir type=dir").arg(owner,group) ); + QCOMPARE( listing[ 3], QString("mode=100644 user=user group=group path=dir/subdir/mediumfile2 type=file size=100") ); + QCOMPARE( listing[ 4], QString("mode=100644 user=weis group=users path=empty type=file size=0") ); + QCOMPARE( listing[ 5], QString("mode=100644 user=user group=group path=hugefile type=file size=20000") ); + QCOMPARE( listing[ 6], QString("mode=100644 user=user group=group path=mediumfile type=file size=100") ); + QCOMPARE( listing[ 7], QString("mode=40777 user=%1 group=%2 path=my type=dir").arg(owner, group) ); + QCOMPARE( listing[ 8], QString("mode=40777 user=%1 group=%2 path=my/dir type=dir").arg(owner, group) ); + QCOMPARE( listing[ 9], QString("mode=100644 user=dfaure group=hackers path=my/dir/test3 type=file size=29") ); + QCOMPARE( listing[10], QString("mode=100440 user=weis group=users path=test1 type=file size=5") ); + QCOMPARE( listing[11], QString("mode=100644 user=weis group=users path=test2 type=file size=8") ); + QCOMPARE( listing[12], QString("mode=40777 user=%1 group=%2 path=z type=dir").arg(owner, group) ); + // This one was added with addLocalFile, so ignore mode/user/group. + QString str = listing[13]; + str.replace(QRegExp("mode.*path"), "path" ); + QCOMPARE( str, QString("path=z/test3 type=file size=13") ); + str = listing[14]; + str.replace(QRegExp("mode.*path"), "path" ); + QCOMPARE( str, QString("path=z/test3_symlink type=file size=0 symlink=test3") ); - QVERIFY( tar.close() ); + QVERIFY( tar.close() ); } }