diff --git a/cmake/jana_plugin.cmake b/cmake/jana_plugin.cmake index ea5c0b2ffa..9027209ad6 100644 --- a/cmake/jana_plugin.cmake +++ b/cmake/jana_plugin.cmake @@ -130,11 +130,11 @@ endmacro() # target_include_directories for both a plugin and a library macro(plugin_include_directories _name) if(${_name}_WITH_PLUGIN) - target_include_directories(${_name}_plugin ${ARGN}) + target_include_directories(${_name}_plugin BEFORE ${ARGN}) endif(${_name}_WITH_PLUGIN) if(${_name}_WITH_LIBRARY) - target_include_directories(${_name}_library ${ARGN}) + target_include_directories(${_name}_library BEFORE ${ARGN}) endif(${_name}_WITH_LIBRARY) endmacro() @@ -288,6 +288,9 @@ macro(plugin_add_acts _name) get_filename_component(ActsCore_PATH ${ActsCore_LOCATION} DIRECTORY) # Add libraries (works same as target_include_directories) + plugin_include_directories( + ${PLUGIN_NAME} PUBLIC + $) plugin_link_libraries( ${PLUGIN_NAME} ActsCore @@ -376,8 +379,7 @@ macro(plugin_add_fastjet _name) endif() # Add include directories - plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC - ${FASTJET_INCLUDE_DIRS}) + plugin_include_directories(${PLUGIN_NAME} PUBLIC ${FASTJET_INCLUDE_DIRS}) # Add libraries plugin_link_libraries(${PLUGIN_NAME} ${FASTJET_LIBRARIES}) @@ -392,8 +394,7 @@ macro(plugin_add_fastjettools _name) endif() # Add include directories - plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC - ${FJTOOLS_INCLUDE_DIRS}) + plugin_include_directories(${PLUGIN_NAME} PUBLIC ${FJTOOLS_INCLUDE_DIRS}) # Add libraries plugin_link_libraries(${PLUGIN_NAME} ${FJTOOLS_LIBRARIES}) @@ -408,8 +409,7 @@ macro(plugin_add_fastjetcontrib _name) endif() # Add include directories - plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC - ${FJCONTRIB_INCLUDE_DIRS}) + plugin_include_directories(${PLUGIN_NAME} PUBLIC ${FJCONTRIB_INCLUDE_DIRS}) # Add libraries plugin_link_libraries(${PLUGIN_NAME} ${FJCONTRIB_LIBRARIES}) diff --git a/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt b/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt index 784be6c6a1..bf5afcd6d5 100644 --- a/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt +++ b/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt @@ -17,12 +17,3 @@ plugin_add_acts(${PLUGIN_NAME}) # correctly sets sources for ${_name}_plugin and ${_name}_library targets Adds # headers to the correct installation directory plugin_glob_all(${PLUGIN_NAME}) - -# Add include directories (same as target_include_directories but for both -# plugin and library) -plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS}) - -# Add libraries (same as target_include_directories but for both plugin and -# library) -plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} ActsCore - EDM4EIC::edm4eic) diff --git a/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt b/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt index 784be6c6a1..bf5afcd6d5 100644 --- a/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt +++ b/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt @@ -17,12 +17,3 @@ plugin_add_acts(${PLUGIN_NAME}) # correctly sets sources for ${_name}_plugin and ${_name}_library targets Adds # headers to the correct installation directory plugin_glob_all(${PLUGIN_NAME}) - -# Add include directories (same as target_include_directories but for both -# plugin and library) -plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS}) - -# Add libraries (same as target_include_directories but for both plugin and -# library) -plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} ActsCore - EDM4EIC::edm4eic) diff --git a/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt b/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt index 784be6c6a1..bf5afcd6d5 100644 --- a/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt +++ b/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt @@ -17,12 +17,3 @@ plugin_add_acts(${PLUGIN_NAME}) # correctly sets sources for ${_name}_plugin and ${_name}_library targets Adds # headers to the correct installation directory plugin_glob_all(${PLUGIN_NAME}) - -# Add include directories (same as target_include_directories but for both -# plugin and library) -plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS}) - -# Add libraries (same as target_include_directories but for both plugin and -# library) -plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} ActsCore - EDM4EIC::edm4eic)