Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-03-02 22:42:01 +0300
committerRay Molenkamp <github@lazydodo.com>2020-03-02 22:42:01 +0300
commit98c74c6a6ec40655e3db462bd4e1335588a10546 (patch)
treeab7f521faa58a92dbba7cd9bab0f65f8386b7883 /build_files/cmake/macros.cmake
parent409074aae56138f49ce078ce919a6d02e44e521e (diff)
Fix: Excessive (re)builds of subprojects
Recent refactor external dependencies handling (D6642) improperly linked all library dependencies with public linkage rather than interface linkage. Causing excessive (re)builds of subprojects when not needed. This patch restores the interface linkage. Reviewed By: brecht sergey Differential Revision: https://developer.blender.org/D6983
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index d082e6e9503..cb45d30c664 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -122,7 +122,7 @@ function(target_link_libraries_optimized
)
foreach(_LIB ${LIBS})
- target_link_libraries(${TARGET} optimized "${_LIB}")
+ target_link_libraries(${TARGET} INTERFACE optimized "${_LIB}")
endforeach()
endfunction()
@@ -132,7 +132,7 @@ function(target_link_libraries_debug
)
foreach(_LIB ${LIBS})
- target_link_libraries(${TARGET} debug "${_LIB}")
+ target_link_libraries(${TARGET} INTERFACE debug "${_LIB}")
endforeach()
endfunction()
@@ -303,11 +303,11 @@ function(blender_add_lib__impl
set(next_library_mode "${library_lower}")
else()
if("${next_library_mode}" STREQUAL "optimized")
- target_link_libraries(${name} optimized ${library})
+ target_link_libraries(${name} INTERFACE optimized ${library})
elseif("${next_library_mode}" STREQUAL "debug")
- target_link_libraries(${name} debug ${library})
+ target_link_libraries(${name} INTERFACE debug ${library})
else()
- target_link_libraries(${name} ${library})
+ target_link_libraries(${name} INTERFACE ${library})
endif()
set(next_library_mode "")
endif()