Skip to content

Commit d0b6e2c

Browse files
committed
Add sometimes needed Eigen link
1 parent 82174b8 commit d0b6e2c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ endif()
2626

2727
# Header-only library
2828
add_executable(example src/example.cpp)
29-
target_link_libraries(example PUBLIC tinyopt)
29+
target_link_libraries(example INTERFACE tinyopt)
30+
target_link_libraries(example PUBLIC Eigen3::Eigen)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ set(CMAKE_CXX_STANDARD 20) # Minimum is c++17
1212
find_package(Tinyopt)
1313
1414
add_executable(example src/example.cpp)
15-
target_link_libraries(example PUBLIC tinyopt)
15+
target_link_libraries(example INTERFACE tinyopt)
16+
target_link_libraries(example PUBLIC Eigen3::Eigen) # needed, sometimes...
1617
```
1718

1819
### Alternative using `git submodule`

0 commit comments

Comments
 (0)