Skip to content

Commit 6778112

Browse files
committed
Added call to target_link_libraries() to link dependency targets.
Signed-off-by: kilo52 <[email protected]>
1 parent 908b960 commit 6778112

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

cpp/01_executable/source/src/main/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ target_include_directories(
1717
cpp
1818
)
1919

20+
target_link_libraries(
21+
${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE
22+
PRIVATE
23+
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LINK_TARGETS}
24+
)
25+
2026
enable_compiler_warnings(
2127
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE}
2228
${${{VAR_PROJECT_NAME_UPPER}}_IGNORE_WARNINGS}

cpp/02_library/source/src/main/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ target_include_directories(
4141
cpp
4242
)
4343

44+
target_link_libraries(
45+
${{VAR_PROJECT_NAME_UPPER}}_TARGET_LIB_MAIN
46+
PRIVATE
47+
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LINK_TARGETS}
48+
)
49+
4450
set_target_properties(
4551
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_LIB_MAIN}
4652
PROPERTIES

cpp/03_server-poco/source/src/main/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ target_link_libraries(
2525
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE}
2626
PUBLIC
2727
netcore
28+
PRIVATE
29+
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LINK_TARGETS}
2830
)
2931

3032
enable_compiler_warnings(

cpp/04_desktop_imgui/source/src/main/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ target_link_libraries(
4646
PUBLIC
4747
glfw
4848
${${{VAR_PROJECT_NAME_UPPER}}_PLATFORM_LINK_LIBRARIES}
49+
PRIVATE
50+
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LINK_TARGETS}
4951
)
5052

5153
if(${{VAR_PROJECT_NAME_UPPER}}_USE_SANITIZERS)

0 commit comments

Comments
 (0)