Skip to content

Commit

Permalink
Merge pull request #236 from traversaro/patch-2
Browse files Browse the repository at this point in the history
Fix find_package(manif) if tl-optional_FOUND is TRUE
  • Loading branch information
artivis authored Jul 21, 2021
2 parents 436702d + 1a7abca commit c13c097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ else(TARGET Eigen3::Eigen)
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIRS})
endif(TARGET Eigen3::Eigen)

# Add tl-optional interface dependency if enabled
if(tl-optional_FOUND)
set(tl-optional_DEPENDENCY "find_dependency(tl-optional)")
else()
set(tl-optional_DEPENDENCY "")
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(${PROJECT_NAME} INTERFACE -ftemplate-depth=512)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
Expand Down
1 change: 1 addition & 0 deletions cmake/manifConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

include(CMakeFindDependencyMacro)
@Eigen3_DEPENDENCY@
@tl-optional_DEPENDENCY@

if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
Expand Down

0 comments on commit c13c097

Please sign in to comment.