From 41e55025e17b2f8e17294bc8cff7b47e8f6af1f7 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 1 Jan 2014 11:35:56 +0100 Subject: Generate forward headers. Install them in the proper directory. Let cmake find them. Had to rename conversion_check.h to conversioncheck.h Had to improve the scripts to support multiple libs in one framework :) --- src/core/CMakeLists.txt | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/core/CMakeLists.txt') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ea272d31..8b6e52e8 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -19,35 +19,39 @@ add_library(KF5ConfigCore ${libkconfigcore_SRCS}) generate_export_header(KF5ConfigCore BASE_NAME KConfigCore) add_library(KF5::ConfigCore ALIAS KF5ConfigCore) +target_include_directories(KF5ConfigCore INTERFACE "$" "$") + target_link_libraries(KF5ConfigCore PUBLIC Qt5::Core) if(WIN32) target_link_libraries(KF5ConfigCore PRIVATE ${KDEWIN_LIBRARIES}) endif() -if(IS_ABSOLUTE "${INCLUDE_INSTALL_DIR}") - target_include_directories(KF5ConfigCore INTERFACE "$" ) -else() - target_include_directories(KF5ConfigCore INTERFACE "$" ) -endif() - set_target_properties(KF5ConfigCore PROPERTIES VERSION ${KCONFIG_VERSION_STRING} SOVERSION ${KCONFIG_SOVERSION} EXPORT_NAME ConfigCore ) +ecm_generate_headers( + KAuthorized + KConfig + KConfigBackend + KConfigBase + KConfigGroup + KDesktopFile + KSharedConfig + KCoreConfigSkeleton + KEMailSettings + ConversionCheck + + MODULE_NAME KConfigCore + REQUIRED_HEADERS KConfigCore_HEADERS +) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KConfigCore DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) + install(TARGETS KF5ConfigCore EXPORT KF5ConfigTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/kconfigcore_export.h - conversion_check.h - kconfig.h - #kconfigbackend.h re-enable post-API review and implementation (4.2?) - kconfigbase.h - kconfiggroup.h - kdesktopfile.h - ksharedconfig.h - kcoreconfigskeleton.h - kauthorized.h - kemailsettings.h - DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kconfigcore_export.h + ${KConfigCore_HEADERS} + DESTINATION ${INCLUDE_INSTALL_DIR}/kconfigcore COMPONENT Devel ) -- cgit v1.2.1