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:
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake25
1 files changed, 18 insertions, 7 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 69a1eb2eb3a..0143335d3b1 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -199,7 +199,7 @@ endfunction()
# Support per-target CMake flags
# Read from: CMAKE_C_FLAGS_**** (made upper case) when set.
#
-# 'name' should alway match the target name,
+# 'name' should always match the target name,
# use this macro before add_library or add_executable.
#
# Optionally takes an arg passed to set(), eg PARENT_SCOPE.
@@ -370,6 +370,11 @@ function(setup_liblinks
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
+ # jemalloc must be early in the list, to be before pthread (see T57998)
+ if(WITH_MEM_JEMALLOC)
+ target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
+ endif()
+
target_link_libraries(
${target}
${PNG_LIBRARIES}
@@ -435,6 +440,9 @@ function(setup_liblinks
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
+ if(WITH_CYCLES_EMBREE)
+ target_link_libraries(${target} ${EMBREE_LIBRARIES})
+ endif()
if(WITH_BOOST)
target_link_libraries(${target} ${BOOST_LIBRARIES})
if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU)
@@ -482,9 +490,6 @@ function(setup_liblinks
)
endif()
endif()
- if(WITH_MEM_JEMALLOC)
- target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
- endif()
if(WITH_MOD_CLOTH_ELTOPO)
target_link_libraries(${target} ${LAPACK_LIBRARIES})
endif()
@@ -509,7 +514,7 @@ function(setup_liblinks
target_link_libraries(${target} ${GFLAGS_LIBRARIES})
endif()
- # We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
+ # We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES depends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
target_link_libraries(${target} "extern_clew")
if(WITH_CUDA_DYNLOAD)
@@ -666,10 +671,10 @@ function(SETUP_BLENDER_SORTED_LIBS)
bf_intern_mikktspace
bf_intern_dualcon
bf_intern_cycles
+ cycles_device
cycles_render
cycles_graph
cycles_bvh
- cycles_device
cycles_kernel
cycles_util
cycles_subd
@@ -1195,7 +1200,11 @@ function(delayed_do_install
foreach(i RANGE ${n})
list(GET files ${i} f)
list(GET destinations ${i} d)
- install(FILES ${f} DESTINATION ${targetdir}/${d})
+ if(NOT IS_ABSOLUTE ${d})
+ install(FILES ${f} DESTINATION ${targetdir}/${d})
+ else()
+ install(FILES ${f} DESTINATION ${d})
+ endif()
endforeach()
endif()
endfunction()
@@ -1232,6 +1241,8 @@ function(data_to_c_simple
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
+ source_group(Generated FILES ${_file_to})
+ list(APPEND ${list_to_add} ${file_from})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)