diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-15 19:15:03 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-15 19:27:02 +0300 |
commit | f70fac6382b78ad3a4b4288372026f2f8213b918 (patch) | |
tree | 609a36c4884c897505f4aec0ad84b1050e13f256 /build_files | |
parent | 5228b0b74fdb006c0ddb0f61bc1f6736f3fd7cb5 (diff) |
Python: fix failing bpy build with full release config on Windows
* Fix issue with different build and install paths.
* Fix issue with oneAPI kernel build.
Ref D15957
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/platform/platform_win32_bundle_crt.cmake | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/build_files/cmake/platform/platform_win32_bundle_crt.cmake b/build_files/cmake/platform/platform_win32_bundle_crt.cmake index f5dd0c8c7bc..f197498d97b 100644 --- a/build_files/cmake/platform/platform_win32_bundle_crt.cmake +++ b/build_files/cmake/platform/platform_win32_bundle_crt.cmake @@ -3,20 +3,22 @@ # First generate the manifest for tests since it will not need the dependency on the CRT. configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY) -if(WITH_WINDOWS_BUNDLE_CRT) - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP}) - - # This sometimes can change when updates are installed and the compiler version - # changes, so test if it exists and if not, give InstallRequiredSystemLibraries - # another chance to figure out the path. - if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}") - unset(MSVC_REDIST_DIR CACHE) - endif() +# Always detect system libraries, since they are also used by oneAPI. +# But don't always install them, only for WITH_WINDOWS_BUNDLE_CRT=ON. +set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) +set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) +set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP}) + +# This sometimes can change when updates are installed and the compiler version +# changes, so test if it exists and if not, give InstallRequiredSystemLibraries +# another chance to figure out the path. +if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}") + unset(MSVC_REDIST_DIR CACHE) +endif() - include(InstallRequiredSystemLibraries) +include(InstallRequiredSystemLibraries) +if(WITH_WINDOWS_BUNDLE_CRT) # ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles # redirects for this dll, for details see T88813. foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) |