Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prepend target include directories #1519

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cmake/jana_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
$<TARGET_PROPERTY:ActsCore,INTERFACE_INCLUDE_DIRECTORIES>)
plugin_link_libraries(
${PLUGIN_NAME}
ActsCore
Expand Down Expand Up @@ -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})
Expand All @@ -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})
Expand All @@ -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})
Expand Down
9 changes: 0 additions & 9 deletions src/benchmarks/reconstruction/femc_studies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
9 changes: 0 additions & 9 deletions src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading