Skip to content

Commit cc756dd

Browse files
committed
Removed call to target_link_libraries() to automatically link to dependencies.
The target names might not always be the same as the CMake project names, thus linking to project names by default is not appropriate. Signed-off-by: kilo52 <[email protected]>
1 parent c3e83ed commit cc756dd

File tree

4 files changed

+0
-24
lines changed

4 files changed

+0
-24
lines changed

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

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

20-
target_link_libraries(
21-
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE}
22-
PRIVATE
23-
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LIST}
24-
)
25-
2620
enable_compiler_warnings(
2721
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE}
2822
${${{VAR_PROJECT_NAME_UPPER}}_IGNORE_WARNINGS}

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

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

44-
target_link_libraries(
45-
${{VAR_PROJECT_NAME_UPPER}}_TARGET_LIB_MAIN
46-
PRIVATE
47-
${${{VAR_PROJECT_NAME_UPPER}}_DEPENDENCIES_LIST}
48-
)
49-
5044
set_target_properties(
5145
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_LIB_MAIN}
5246
PROPERTIES

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ 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_LIST}
24-
)
25-
2620
enable_compiler_warnings(
2721
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_APPLICATION_CORE}
2822
${${{VAR_PROJECT_NAME_UPPER}}_IGNORE_WARNINGS}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ 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_LIST}
48-
)
49-
5044
set_target_properties(
5145
${${{VAR_PROJECT_NAME_UPPER}}_TARGET_LIB_MAIN}
5246
PROPERTIES

0 commit comments

Comments
 (0)