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-14 16:18:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-14 16:37:24 +0300
commit47adab4f993e66328bd1ad97abaf6697784ee8a0 (patch)
tree3eb7046a95b0ce3f2ad707764213df372f22abbd /build_files
parenteee5a880f186fe9e49bd41a9dc7d6d0bdd371c36 (diff)
CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 9d1baaa24fd..c4ae75db9d7 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -222,6 +222,7 @@ function(blender_add_lib__impl
sources
includes
includes_sys
+ libraries
)
# message(STATUS "Configuring library ${name}")
@@ -233,6 +234,11 @@ function(blender_add_lib__impl
add_library(${name} ${sources})
+ # Use for testing 'BLENDER_SORTED_LIBS' removal.
+ if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS)
+ target_link_libraries(${name} "${libraries}")
+ endif()
+
# works fine without having the includes
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${sources}")
@@ -257,11 +263,12 @@ function(blender_add_lib_nolist
sources
includes
includes_sys
+ libraries
)
add_cc_flags_custom_test(${name} PARENT_SCOPE)
- blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
+ blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${libraries}")
endfunction()
function(blender_add_lib
@@ -269,11 +276,12 @@ function(blender_add_lib
sources
includes
includes_sys
+ libraries
)
add_cc_flags_custom_test(${name} PARENT_SCOPE)
- blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
+ blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${libraries}")
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
endfunction()