[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kservice] /: Generate forward headers
From:       David Faure <faure () kde ! org>
Date:       2013-12-31 18:10:46
Message-ID: E1Vy3mA-0006MR-09 () scm ! kde ! org
[Download RAW message or body]

Git commit 23cb10b93004deca5e66cc7bca598da2ac3e182d by David Faure.
Committed on 31/12/2013 at 18:10.
Pushed by dfaure into branch 'master'.

Generate forward headers

Install them in the proper directory.
Let cmake find them.

M  +1    -0    CMakeLists.txt
M  +47   -26   src/CMakeLists.txt

http://commits.kde.org/kservice/23cb10b93004deca5e66cc7bca598da2ac3e182d

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c0474f..04f27c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@ include(KDEInstallDirs)
 include(KDEFrameworkCompilerSettings)
 include(KDECMakeSettings)
 include(ECMSetupVersion)
+include(ECMGenerateHeaders)
 =

 set(KF5_VERSION "5.0.0")
 =

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d686bc9..c36ce04 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -64,6 +64,8 @@ set(kservice_includes
 )
 target_include_directories(KF5Service PUBLIC "$<BUILD_INTERFACE:${kservice=
_includes}>")
 =

+target_include_directories(KF5Service INTERFACE "$<INSTALL_INTERFACE:${INC=
LUDE_INSTALL_DIR}/kservice>" "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/KS=
ervice>")
+
 target_link_libraries(KF5Service
   PUBLIC
     KF5::ConfigCore   # KConfig and friends
@@ -78,33 +80,43 @@ set_target_properties(KF5Service PROPERTIES VERSION ${K=
SERVICE_VERSION_STRING}
                                             EXPORT_NAME Service
 )
 =

-install(TARGETS KF5Service EXPORT KF5ServiceTargets ${INSTALL_TARGETS_DEFA=
ULT_ARGS})
+ecm_generate_headers(
+  KLibrary
+  KPluginFactory
+  KPluginLoader
+  KExportPlugin
+  KPluginTrader
+  KDBusServiceStarter
 =

-install(FILES
-   "${CMAKE_CURRENT_BINARY_DIR}/kservice_export.h"
-   kdeinit/ktoolinvocation.h
-   services/kautostart.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
-   sycoca/ksycoca.h
-   sycoca/ksycocaentry.h
-   sycoca/ksycocatype.h
-   plugin/klibrary.h
-   plugin/kpluginfactory.h
-   plugin/kpluginloader.h
-   plugin/kexportplugin.h
-   plugin/kplugintrader.h
-   plugin/kdbusservicestarter.h
-   DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
+  RELATIVE plugin REQUIRED_HEADERS KService_HEADERS
+)
+ecm_generate_headers(
+  KSycoca
+  KSycocaEntry
+  KSycocaType
+
+  RELATIVE sycoca REQUIRED_HEADERS KService_HEADERS
+)
+ecm_generate_headers(
+  KToolInvocation
+
+  RELATIVE kdeinit REQUIRED_HEADERS KService_HEADERS
+)
+ecm_generate_headers(
+  KAutostart
+  KMimeTypeTrader
+  KService
+  KServiceAction
+  KServiceGroup
+  KServiceFactory
+  KServiceType
+  KServiceTypeFactory
+  KServiceTypeProfile
+  KServiceTypeTrader
+  KServiceOffer
+  KPluginInfo
+
+  RELATIVE services REQUIRED_HEADERS KService_HEADERS
 )
 =

 install(FILES
@@ -112,6 +124,15 @@ install(FILES
    services/application.desktop
    DESTINATION ${SERVICETYPES_INSTALL_DIR}
 )
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KService DESTINATION ${INCLU=
DE_INSTALL_DIR} COMPONENT Devel)
+
+install(TARGETS KF5Service EXPORT KF5ServiceTargets ${INSTALL_TARGETS_DEFA=
ULT_ARGS})
+
+install(FILES
+   "${CMAKE_CURRENT_BINARY_DIR}/kservice_export.h"
+   ${KService_HEADERS}
+   DESTINATION ${INCLUDE_INSTALL_DIR}/kservice COMPONENT Devel
+)
 =

 add_subdirectory(kbuildsycoca)
 add_subdirectory(desktoptojson)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic