CMake: pass link deps to library targets with INTERFACE
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Jun 2019 00:16:06 +0000 (10:16 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Jun 2019 00:16:06 +0000 (10:16 +1000)
Introduced since removing BLENDER_SORTED_LIBS.

This caused building a library to build all it's dependencies.

build_files/cmake/macros.cmake

index 10b293c..5fd677e 100644 (file)
@@ -235,7 +235,7 @@ function(blender_add_lib__impl
   add_library(${name} ${sources})
 
   if (NOT "${library_deps}" STREQUAL "")
-    target_link_libraries(${name} "${library_deps}")
+    target_link_libraries(${name} INTERFACE "${library_deps}")
   endif()
 
   # works fine without having the includes