Skip to content

Commit

Permalink
Improve GLM linking for any version (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
NadirRoGue authored Jun 23, 2023
1 parent 0ec92fd commit ce350f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ enable_testing()
# Compile dependencies
add_subdirectory(deps)

set(GLM_TARGET glm)
if(TARGET glm::glm)
set(GLM_TARGET glm::glm)
endif()

# Create the two main libraries
add_subdirectory(brion)
add_subdirectory(brain)
Expand Down
2 changes: 1 addition & 1 deletion brain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ target_include_directories(Brain SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})

# Link libraries
target_link_libraries(Brain PUBLIC Brion)
target_link_libraries(Brain PUBLIC glm::glm)
target_link_libraries(Brain PUBLIC ${GLM_TARGET})
target_link_libraries(Brain PRIVATE sonata::sonata_shared)
target_link_libraries(Brain PRIVATE HighFive)
target_link_libraries(Brain PRIVATE ${Boost_FILESYSTEM_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion brion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ target_include_directories(Brion PUBLIC
target_include_directories(Brion SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})

# Link libraries
target_link_libraries(Brion PUBLIC glm::glm)
target_link_libraries(Brion PUBLIC ${GLM_TARGET})
target_link_libraries(Brion PRIVATE HighFive)
target_link_libraries(Brion PRIVATE MorphIO::morphio)
target_link_libraries(Brion PRIVATE ${Boost_FILESYSTEM_LIBRARIES})
Expand Down

0 comments on commit ce350f9

Please sign in to comment.