From 90280d82aaf0c155b74e4c0d880eeff7d5823ecd Mon Sep 17 00:00:00 2001 From: "Scott P. Wakely" Date: Tue, 20 Aug 2024 10:04:08 -0500 Subject: [PATCH] Mods to allow to be used in another project --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3386e1e..910fe432 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif(POLICY CMP0042) # declare the project name PROJECT(genfit2) -# SPW Additions +# SPW Mods message("${BYellow}-- Current ${PROJECT_NAME} Environment --${ColReset}") message("${BWhite} compiler : ${BCyan}${CMAKE_CXX_COMPILER_ID} v${CMAKE_CXX_COMPILER_VERSION}${ColReset}") message("${BWhite} standard : ${BCyan}c++${CMAKE_CXX_STANDARD}${ColReset}") @@ -17,12 +17,12 @@ message("${BWhite} Type : ${BCyan}${CMAKE_BUILD_TYPE}${ColReset}") message("${BYellow}-- Current ${PROJECT_NAME} Environment --${ColReset}") message("") - # set project version: # NB: this does not seem to be updated by the GenFit maintainers to match their actual release versions SET( ${PROJECT_NAME}_VERSION_MAJOR 2 ) SET( ${PROJECT_NAME}_VERSION_MINOR 0 ) SET( ${PROJECT_NAME}_VERSION_PATCH 5-hlx ) +# End SPW Mods include(GNUInstallDirs) @@ -285,6 +285,11 @@ endif() ADD_SHARED_LIBRARY( ${PROJECT_NAME} ${library_sources}) INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIBRARY_OUTPUT_DIRECTORY}) +#SPW Mods +target_include_directories(${PROJECT_NAME} PUBLIC ${GF_INC_DIRS}) +set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) +#End SPW Mods + # link ROOT libraries if(DEFINED RAVE) TARGET_LINK_LIBRARIES(