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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-15 07:38:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-15 07:42:24 +0300
commit0a90b8bbcffe0326300408802f793d131cdeb8f1 (patch)
tree6e3d47005fa26e579d48060eb7d7fdf89f7f9077
parent860a9f979d60086ab6da89ba699b9615ae321173 (diff)
CMake: resolve issue building without sorted libs
Linking empty libs gave an error.
-rw-r--r--build_files/cmake/macros.cmake4
-rw-r--r--source/creator/CMakeLists.txt9
2 files changed, 11 insertions, 2 deletions
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
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index e4045d0b77c..1455560d138 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -37,6 +37,9 @@ blender_include_dirs(
../blender/windowmanager
)
+set(LIB
+)
+
add_definitions(${GL_DEFINITIONS})
blender_include_dirs("${GLEW_INCLUDE_PATH}")
@@ -1025,12 +1028,16 @@ add_dependencies(blender makesdna)
# Use for testing 'BLENDER_SORTED_LIBS' removal.
if(NOT (DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS))
setup_blender_sorted_libs()
+ target_link_libraries(blender ${BLENDER_SORTED_LIBS})
+else()
+ target_link_libraries(blender ${LIB})
endif()
-target_link_libraries(blender ${BLENDER_SORTED_LIBS})
setup_liblinks(blender)
+unset(LIB)
+
# -----------------------------------------------------------------------------
# Setup launcher