From 0a90b8bbcffe0326300408802f793d131cdeb8f1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 15 Apr 2019 06:38:26 +0200 Subject: CMake: resolve issue building without sorted libs Linking empty libs gave an error. --- build_files/cmake/macros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build_files/cmake/macros.cmake') diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index c4ae75db9d7..3947f087105 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -236,7 +236,9 @@ function(blender_add_lib__impl # Use for testing 'BLENDER_SORTED_LIBS' removal. if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS) - target_link_libraries(${name} "${libraries}") + if (NOT "${libraries}" STREQUAL "") + target_link_libraries(${name} "${libraries}") + endif() endif() # works fine without having the includes -- cgit v1.2.3