Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Detector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ add_library(Detector SHARED

#message( "source dir detector " ${CMAKE_SOURCE_DIR}/..)
# set top-level directory as include root
target_include_directories(Detector PUBLIC
target_include_directories(Detector PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link this library with ROOT libraries and other KinKal libraries
target_link_libraries(Detector Trajectory General ${ROOT_LIBRARIES})
target_link_libraries(Detector PUBLIC Trajectory General ${ROOT_LIBRARIES})

# set shared library version equal to project version
set_target_properties(Detector PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
4 changes: 2 additions & 2 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ add_library(Examples SHARED
ExamplesDict
)
target_include_directories(Examples PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(Examples PUBLIC
target_include_directories(Examples PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link ROOT libraries
target_link_libraries(Examples ${ROOT_LIBRARIES})
target_link_libraries(Examples PUBLIC ${ROOT_LIBRARIES})
# set shared library version equal to project version
set_target_properties(Examples PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
4 changes: 2 additions & 2 deletions Fit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ add_library(Fit SHARED
)

# set top-level directory as include root
target_include_directories(Fit PUBLIC
target_include_directories(Fit PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link this library with ROOT libraries
target_link_libraries(Fit Detector Trajectory General ${ROOT_LIBRARIES})
target_link_libraries(Fit PUBLIC Detector Trajectory General ${ROOT_LIBRARIES})

# set shared library version equal to project version
set_target_properties(Fit PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
4 changes: 2 additions & 2 deletions General/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ ROOT_GENERATE_DICTIONARY(GeneralDict
)

# set top-level directory as include root
target_include_directories(General PUBLIC
target_include_directories(General PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link this library with ROOT libraries
target_link_libraries(General ${ROOT_LIBRARIES})
target_link_libraries(General PUBLIC ${ROOT_LIBRARIES})

# set shared library version equal to project version
set_target_properties(General PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
4 changes: 2 additions & 2 deletions Geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ add_library(Geometry SHARED
set(CMAKE_SHARED_LIBRARY_PREFIX "libKinKal_")

# set top-level directory as include root
target_include_directories(Geometry PUBLIC
target_include_directories(Geometry PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link this library with ROOT libraries
target_link_libraries(Geometry General ${ROOT_LIBRARIES})
target_link_libraries(Geometry PUBLIC General ${ROOT_LIBRARIES})

# set shared library version equal to project version
set_target_properties(Geometry PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
2 changes: 1 addition & 1 deletion Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ foreach( testsourcefile ${TEST_SOURCE_FILES} )
# add the project root as an include directory
# link all unit tests to KinKal, MatEnv, and ROOT libraries.
target_include_directories(Test_${testname} PRIVATE ${PROJECT_SOURCE_DIR}/..)
target_link_libraries( Test_${testname} General Trajectory Geometry Detector Fit MatEnv Examples ${ROOT_LIBRARIES} )
target_link_libraries( Test_${testname} PRIVATE General Trajectory Geometry Detector Fit MatEnv Examples ${ROOT_LIBRARIES} )

# ensure the unit test executable filename is just its test name
set_target_properties( Test_${testname} PROPERTIES OUTPUT_NAME ${testname})
Expand Down
4 changes: 2 additions & 2 deletions Trajectory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ ROOT_GENERATE_DICTIONARY(TrajectoryDict
)

# set top-level directory as include root
target_include_directories(Trajectory PUBLIC
target_include_directories(Trajectory PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>)

# link this library with ROOT libraries
target_link_libraries(Trajectory Geometry General ${ROOT_LIBRARIES})
target_link_libraries(Trajectory PUBLIC Geometry General ${ROOT_LIBRARIES})

# set shared library version equal to project version
set_target_properties(Trajectory PROPERTIES VERSION ${PROJECT_VERSION} PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
Loading