CMake/Win: use manifest for PLATFORM_BUNDLED_LIBRARIES
`PLATFORM_BUNDLED_LIBRARIES` was installing right next to the blender executable rather than the `blender.shared` folder, `PLATFORM_BUNDLED_LIBRARIES` wasn't used very much on windows, just by the ONEAPI code which likely wasn't aware this plumbing was still missing. This diff adds support for using `PLATFORM_BUNDLED_LIBRARIES` on windows in both debug and release configurations. You can differentiate between a .dll being installed for debug/release or all configurations, by prefixing the library with either `DEBUG`, `RELEASE` or `All`, if no prefix is given `ALL` is assumed. Pull Request: https://projects.blender.org/blender/blender/pulls/106348
This commit is contained in:
parent
4b15f2158f
commit
17800e0c03
@ -1364,3 +1364,24 @@ macro(windows_generate_shared_manifest)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(windows_process_platform_bundled_libraries library_deps)
|
||||||
|
if(NOT "${library_deps}" STREQUAL "")
|
||||||
|
set(next_library_mode "ALL")
|
||||||
|
foreach(library ${library_deps})
|
||||||
|
string(TOUPPER "${library}" library_upper)
|
||||||
|
if(("${library_upper}" STREQUAL "RELEASE") OR
|
||||||
|
("${library_upper}" STREQUAL "DEBUG") OR
|
||||||
|
("${library_upper}" STREQUAL "ALL"))
|
||||||
|
set(next_library_mode "${library_upper}")
|
||||||
|
else()
|
||||||
|
windows_install_shared_manifest(
|
||||||
|
FILES ${library}
|
||||||
|
${next_library_mode}
|
||||||
|
)
|
||||||
|
set(next_library_mode "ALL")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
@ -1040,8 +1040,9 @@ if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
${SYCL_ROOT_DIR}/bin/sycl[0-9].dll
|
${SYCL_ROOT_DIR}/bin/sycl[0-9].dll
|
||||||
)
|
)
|
||||||
foreach(sycl_runtime_library IN LISTS _sycl_runtime_libraries_glob)
|
foreach(sycl_runtime_library IN LISTS _sycl_runtime_libraries_glob)
|
||||||
string(REPLACE ".dll" "$<$<CONFIG:Debug>:d>.dll" sycl_runtime_library ${sycl_runtime_library})
|
string(REPLACE ".dll" "_d.dll" sycl_runtime_library_debug ${sycl_runtime_library})
|
||||||
list(APPEND _sycl_runtime_libraries ${sycl_runtime_library})
|
list(APPEND _sycl_runtime_libraries RELEASE ${sycl_runtime_library})
|
||||||
|
list(APPEND _sycl_runtime_libraries DEBUG ${sycl_runtime_library_debug})
|
||||||
endforeach()
|
endforeach()
|
||||||
unset(_sycl_runtime_libraries_glob)
|
unset(_sycl_runtime_libraries_glob)
|
||||||
|
|
||||||
|
@ -1293,10 +1293,7 @@ elseif(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM_BUNDLED_LIBRARIES)
|
if(PLATFORM_BUNDLED_LIBRARIES)
|
||||||
install(
|
windows_process_platform_bundled_libraries("${PLATFORM_BUNDLED_LIBRARIES}")
|
||||||
FILES ${PLATFORM_BUNDLED_LIBRARIES}
|
|
||||||
DESTINATION ${TARGETDIR_EXE}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
if(NOT WITH_PYTHON_MODULE)
|
if(NOT WITH_PYTHON_MODULE)
|
||||||
|
Loading…
Reference in New Issue
Block a user