msgfmt: fix runtime requirements
msgfmt has a TBB dependency though bf_blenlib, now for a release build The MSVC linker is smart enough to realize none of the TBB code is actually used and discards it. In debug mode the linker is a bit more conservative and doesn't, leaving msgfmt with a runtime dependency on TBB. The problem here is, we only copy the runtime dlls during the install phase, and msgfmt runs long long before that. For this reason when we run msgfmt we should make sure any runtime needs it could have are met in the path, there already is a handy variable for that since oslc has similar requirements. Pull Request #105048
This commit is contained in:
@@ -1090,7 +1090,7 @@ function(msgfmt_simple
|
||||
add_custom_command(
|
||||
OUTPUT ${_file_to}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
|
||||
COMMAND "$<TARGET_FILE:msgfmt>" ${_file_from} ${_file_to}
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${PLATFORM_ENV_BUILD} "$<TARGET_FILE:msgfmt>" ${_file_from} ${_file_to}
|
||||
DEPENDS msgfmt ${_file_from})
|
||||
|
||||
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
|
||||
|
||||
@@ -1040,7 +1040,7 @@ endif()
|
||||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ";" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD_DIRS "${LIBDIR}/OpenImageIO/bin\;${LIBDIR}/boost/lib\;${LIBDIR}/openexr/bin\;${LIBDIR}/imath/bin\;${PATH}")
|
||||
set(PLATFORM_ENV_BUILD_DIRS "${LIBDIR}/tbb/bin\;${LIBDIR}/OpenImageIO/bin\;${LIBDIR}/boost/lib\;${LIBDIR}/openexr/bin\;${LIBDIR}/imath/bin\;${PATH}")
|
||||
set(PLATFORM_ENV_BUILD "PATH=${PLATFORM_ENV_BUILD_DIRS}")
|
||||
# Install needs the additional folders from PLATFORM_ENV_BUILD_DIRS as well, as tools like idiff and abcls use the release mode dlls
|
||||
set(PLATFORM_ENV_INSTALL "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/\;${PLATFORM_ENV_BUILD_DIRS}\;$ENV{PATH}")
|
||||
|
||||
Reference in New Issue
Block a user