Skip to content

Commit a646d4d

Browse files
author
mlund
committed
Make dependent libraries private
1 parent 26dc444 commit a646d4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ include(cmake/CPM.cmake)
2222

2323
# dependencies
2424
CPMAddPackage("gh:doctest/doctest#v2.4.12")
25-
CPMAddPackage("gh:nlohmann/json@3.11.3")
25+
CPMAddPackage("gh:nlohmann/json@3.12.0")
2626
CPMAddPackage("gh:TheLartians/[email protected]")
2727

2828
CPMAddPackage(NAME Eigen VERSION 3.4.0 DOWNLOAD_ONLY YES
@@ -71,10 +71,10 @@ packageProject(
7171

7272
# example
7373
add_executable(example EXCLUDE_FROM_ALL test/example.cpp)
74-
target_link_libraries(example ${PROJECT_NAME} nlohmann_json)
74+
target_link_libraries(example PRIVATE ${PROJECT_NAME} nlohmann_json)
7575

7676
# unittests
7777
add_executable(tests test/unittests.cpp)
78-
target_link_libraries(tests ${PROJECT_NAME} doctest Eigen nlohmann_json)
78+
target_link_libraries(tests PRIVATE ${PROJECT_NAME} doctest Eigen nlohmann_json)
7979
add_test(NAME tests COMMAND tests)
8080

0 commit comments

Comments
 (0)