Skip to content

Commit

Permalink
Use system Eigen3 CMake Config and Eigen target when linking (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
briansoe66 authored Sep 14, 2023
1 parent c914d89 commit 3f302dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 367 deletions.
1 change: 1 addition & 0 deletions ifopt-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#
#=============================================================================

find_dependency(Eigen3)

# these are autogenerate by cmake
include("${CMAKE_CURRENT_LIST_DIR}/ifopt_core-targets.cmake")
Expand Down
6 changes: 4 additions & 2 deletions ifopt_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_package(Eigen3 REQUIRED)


Expand All @@ -15,7 +14,10 @@ target_include_directories(${LIB_CORE}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/test>
$<INSTALL_INTERFACE:include>
${EIGEN3_INCLUDE_DIR}
)
target_link_libraries(${LIB_CORE}
PUBLIC
Eigen3::Eigen
)
# better specify features you need, not c++ version
target_compile_features(${LIB_CORE}
Expand Down
97 changes: 0 additions & 97 deletions ifopt_core/cmake/FindEigen3.cmake

This file was deleted.

268 changes: 0 additions & 268 deletions ifopt_core/cmake/FindGTest.cmake

This file was deleted.

0 comments on commit 3f302dd

Please sign in to comment.