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) diff --git a/k4ActsTracking/CMakeLists.txt b/k4ActsTracking/CMakeLists.txt index ac3e5da..b33798a 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 + LINK + k4FWCore::k4FWCore +) +install(TARGETS k4ActsTracking + EXPORT k4ActsTrackingTargets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) + 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: