Use PRIVATE in target_link_libraries

This commit is contained in:
Olivier Goffart 2020-12-16 14:29:12 +01:00
parent e249260435
commit 002cfa76af
5 changed files with 5 additions and 5 deletions

View file

@ -76,7 +76,7 @@ FetchContent_Declare(
FetchContent_MakeAvailable(SixtyFPS)
add_executable(my_application main.cpp)
target_link_libraries(my_application SixtyFPS::SixtyFPS)
target_link_libraries(my_application PRIVATE SixtyFPS::SixtyFPS)
sixtyfps_target_60_sources(my_application my_application_ui.60)
```

View file

@ -15,5 +15,5 @@ if (NOT TARGET SixtyFPS::SixtyFPS)
endif()
add_executable(gallery main.cpp)
target_link_libraries(gallery SixtyFPS::SixtyFPS)
target_link_libraries(gallery PRIVATE SixtyFPS::SixtyFPS)
sixtyfps_target_60_sources(gallery gallery.60)

View file

@ -17,5 +17,5 @@ endif()
# Note, we can't name it simply "memory" because there is a C++ standard header with the same name
# so `#include<memory>` includes the generated binary when it exists
add_executable(memory_game memory.cpp)
target_link_libraries(memory_game SixtyFPS::SixtyFPS)
target_link_libraries(memory_game PRIVATE SixtyFPS::SixtyFPS)
sixtyfps_target_60_sources(memory_game memory.60)

View file

@ -15,5 +15,5 @@ if (NOT TARGET SixtyFPS::SixtyFPS)
endif()
add_executable(printerdemo main.cpp)
target_link_libraries(printerdemo SixtyFPS::SixtyFPS)
target_link_libraries(printerdemo PRIVATE SixtyFPS::SixtyFPS)
sixtyfps_target_60_sources(printerdemo ../ui/printerdemo.60)

View file

@ -15,5 +15,5 @@ if (NOT TARGET SixtyFPS::SixtyFPS)
endif()
add_executable(todo main.cpp)
target_link_libraries(todo SixtyFPS::SixtyFPS)
target_link_libraries(todo PRIVATE SixtyFPS::SixtyFPS)
sixtyfps_target_60_sources(todo ../ui/todo.60)