From 7247fd4ee1ae749a244d6c279a3a5a6c80525905 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 19 Dec 2023 15:39:10 -0600 Subject: [PATCH 1/3] fix: install IActsGeoSvc.h into /include/k4ActsTracking/IActsGeoSvc.h --- k4ActsTracking/CMakeLists.txt | 19 +++++++++++++++++++ .../k4ActsTracking}/IActsGeoSvc.h | 0 k4ActsTracking/src/components/ActsGeoSvc.h | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) rename k4ActsTracking/{src/components => include/k4ActsTracking}/IActsGeoSvc.h (100%) diff --git a/k4ActsTracking/CMakeLists.txt b/k4ActsTracking/CMakeLists.txt index ac3e5da..2c0e2eb 100644 --- a/k4ActsTracking/CMakeLists.txt +++ b/k4ActsTracking/CMakeLists.txt @@ -16,6 +16,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ]] + +gaudi_add_header_only_library(k4ActsTracking) + +install(TARGETS k4ActsTracking + EXPORT k4ActsTrackingTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev + ) + file(GLOB _plugin_sources src/components/*.cpp) gaudi_add_module(k4ActsTrackingPlugins SOURCES ${_plugin_sources} @@ -26,6 +36,15 @@ gaudi_add_module(k4ActsTrackingPlugins DD4hep::DDCore DD4hep::DDRec ActsCore ActsPluginDD4hep ) +target_include_directories(k4ActsTrackingPlugins PUBLIC + $ + $) + +install(TARGETS k4ActsTrackingPlugins + EXPORT k4ActsTrackingTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) set(GAUDI_GENCONF_DIR "genConfDir") diff --git a/k4ActsTracking/src/components/IActsGeoSvc.h b/k4ActsTracking/include/k4ActsTracking/IActsGeoSvc.h similarity index 100% rename from k4ActsTracking/src/components/IActsGeoSvc.h rename to k4ActsTracking/include/k4ActsTracking/IActsGeoSvc.h diff --git a/k4ActsTracking/src/components/ActsGeoSvc.h b/k4ActsTracking/src/components/ActsGeoSvc.h index 5ac3a4e..9cb33be 100644 --- a/k4ActsTracking/src/components/ActsGeoSvc.h +++ b/k4ActsTracking/src/components/ActsGeoSvc.h @@ -35,7 +35,7 @@ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Service.h" #include "GaudiKernel/ServiceHandle.h" -#include "IActsGeoSvc.h" +#include "k4ActsTracking/IActsGeoSvc.h" class ActsGeoSvc : public extends { public: From 637bc17a13719b3bed0636d8c0ac673c716a6a06 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 8 Jan 2024 08:04:45 -0600 Subject: [PATCH 2/3] feet: install exported targets --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef66cbe..96368e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,3 +46,11 @@ include(CTest) add_subdirectory(k4ActsTracking) add_subdirectory(test) + +install(EXPORT ${PROJECT_NAME}Targets + NAMESPACE ${PROJECT_NAME}:: + FILE "${PROJECT_NAME}Targets.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/" + ) + +gaudi_install(CMAKE cmake/${PROJECT_NAME}Config.cmake) From 27bff3d95c790a2e0abfa0194c28e28a12477549 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 8 Jan 2024 08:06:46 -0600 Subject: [PATCH 3/3] fix: link k4FWCore target for includes; install headers --- k4ActsTracking/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/k4ActsTracking/CMakeLists.txt b/k4ActsTracking/CMakeLists.txt index 2c0e2eb..b33798a 100644 --- a/k4ActsTracking/CMakeLists.txt +++ b/k4ActsTracking/CMakeLists.txt @@ -17,14 +17,14 @@ See the License for the specific language governing permissions and limitations under the License. ]] -gaudi_add_header_only_library(k4ActsTracking) - +gaudi_add_header_only_library(k4ActsTracking + LINK + k4FWCore::k4FWCore +) install(TARGETS k4ActsTracking EXPORT k4ActsTrackingTargets - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib - COMPONENT dev - ) + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) file(GLOB _plugin_sources src/components/*.cpp) gaudi_add_module(k4ActsTrackingPlugins