CMake: resolve issue building without sorted libs
Linking empty libs gave an error.
This commit is contained in:
@@ -236,7 +236,9 @@ function(blender_add_lib__impl
|
|||||||
|
|
||||||
# Use for testing 'BLENDER_SORTED_LIBS' removal.
|
# Use for testing 'BLENDER_SORTED_LIBS' removal.
|
||||||
if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS)
|
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()
|
endif()
|
||||||
|
|
||||||
# works fine without having the includes
|
# works fine without having the includes
|
||||||
|
@@ -37,6 +37,9 @@ blender_include_dirs(
|
|||||||
../blender/windowmanager
|
../blender/windowmanager
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(LIB
|
||||||
|
)
|
||||||
|
|
||||||
add_definitions(${GL_DEFINITIONS})
|
add_definitions(${GL_DEFINITIONS})
|
||||||
blender_include_dirs("${GLEW_INCLUDE_PATH}")
|
blender_include_dirs("${GLEW_INCLUDE_PATH}")
|
||||||
|
|
||||||
@@ -1025,12 +1028,16 @@ add_dependencies(blender makesdna)
|
|||||||
# Use for testing 'BLENDER_SORTED_LIBS' removal.
|
# Use for testing 'BLENDER_SORTED_LIBS' removal.
|
||||||
if(NOT (DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS))
|
if(NOT (DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS))
|
||||||
setup_blender_sorted_libs()
|
setup_blender_sorted_libs()
|
||||||
|
target_link_libraries(blender ${BLENDER_SORTED_LIBS})
|
||||||
|
else()
|
||||||
|
target_link_libraries(blender ${LIB})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(blender ${BLENDER_SORTED_LIBS})
|
|
||||||
|
|
||||||
setup_liblinks(blender)
|
setup_liblinks(blender)
|
||||||
|
|
||||||
|
unset(LIB)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Setup launcher
|
# Setup launcher
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user