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')
-rw-r--r--build_files/cmake/macros.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 5ffd6c4e7f4..f57a6952164 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1547,3 +1547,21 @@ function(print_all_vars)
message("${_var}=${${_var}}")
endforeach()
endfunction()
+
+macro(openmp_delayload
+ projectname
+ )
+ if(MSVC)
+ if(WITH_OPENMP)
+ if(MSVC_VERSION EQUAL 1800)
+ set(OPENMP_DLL_NAME "vcomp120")
+ else()
+ set(OPENMP_DLL_NAME "vcomp140")
+ endif()
+ SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELEASE "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
+ SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_DEBUG "/DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
+ SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
+ SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_MINSIZEREL "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
+ endif(WITH_OPENMP)
+ endif(MSVC)
+endmacro()