diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/imbuf/intern/openexr/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/io/usd/CMakeLists.txt | 6 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_capi_export.cc | 2 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_capi_import.cc | 10 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_common.cc | 5 | ||||
-rw-r--r-- | source/blender/io/usd/tests/usd_tests_common.cc | 7 | ||||
-rw-r--r-- | source/blender/io/usd/usd.h | 2 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 323 | ||||
-rw-r--r-- | source/creator/creator.c | 8 | ||||
-rw-r--r-- | source/creator/symbols_apple.map | 1 |
10 files changed, 289 insertions, 80 deletions
diff --git a/source/blender/imbuf/intern/openexr/CMakeLists.txt b/source/blender/imbuf/intern/openexr/CMakeLists.txt index c34a97f6837..509255c37b9 100644 --- a/source/blender/imbuf/intern/openexr/CMakeLists.txt +++ b/source/blender/imbuf/intern/openexr/CMakeLists.txt @@ -32,6 +32,11 @@ if(WITH_IMAGE_OPENEXR) ${OPENEXR_LIBRARIES} ) add_definitions(-DWITH_OPENEXR) + if(WIN32) + if(EXISTS ${LIBDIR}/imath/bin/imath.dll) + add_definitions(-DIMATH_DLL) + endif() + endif() endif() blender_add_lib(bf_imbuf_openexr "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/source/blender/io/usd/CMakeLists.txt b/source/blender/io/usd/CMakeLists.txt index 4f1bc29cd0d..efa22b2add2 100644 --- a/source/blender/io/usd/CMakeLists.txt +++ b/source/blender/io/usd/CMakeLists.txt @@ -9,9 +9,9 @@ if(UNIX AND NOT APPLE) add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH) endif() if(WIN32) - add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) + add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -DBOOST_DEBUG_PYTHON) endif() -add_definitions(-DPXR_STATIC) +add_definitions(-DBOOST_ALL_NO_LIB) # USD headers use deprecated TBB headers, silence warning. add_definitions(-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1) @@ -56,6 +56,7 @@ set(INC_SYS ${USD_INCLUDE_DIRS} ${BOOST_INCLUDE_DIR} ${TBB_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ) set(SRC @@ -122,6 +123,7 @@ set(LIB list(APPEND LIB ${BOOST_LIBRARIES} + ${PYTHON_LIBRARIES} ) if(WITH_OPENVDB) diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index 3977daaca4a..6731412e158 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -174,8 +174,6 @@ bool USD_export(bContext *C, ViewLayer *view_layer = CTX_data_view_layer(C); Scene *scene = CTX_data_scene(C); - blender::io::usd::ensure_usd_plugin_path_registered(); - blender::io::usd::ExportJobData *job = static_cast<blender::io::usd::ExportJobData *>( MEM_mallocN(sizeof(blender::io::usd::ExportJobData), "ExportJobData")); diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc index 5808c6bc77a..cd50f41b9fb 100644 --- a/source/blender/io/usd/intern/usd_capi_import.cc +++ b/source/blender/io/usd/intern/usd_capi_import.cc @@ -385,13 +385,16 @@ static void import_freejob(void *user_data) using namespace blender::io::usd; +void USD_ensure_plugin_path_registered() +{ + blender::io::usd::ensure_usd_plugin_path_registered(); +} + bool USD_import(struct bContext *C, const char *filepath, const USDImportParams *params, bool as_background_job) { - blender::io::usd::ensure_usd_plugin_path_registered(); - /* Using new here since `MEM_*` functions do not call constructor to properly initialize data. */ ImportJobData *job = new ImportJobData(); job->bmain = CTX_data_main(C); @@ -545,9 +548,6 @@ CacheArchiveHandle *USD_create_handle(struct Main * /*bmain*/, const char *filepath, ListBase *object_paths) { - /* Must call this so that USD file format plugins are loaded. */ - ensure_usd_plugin_path_registered(); - pxr::UsdStageRefPtr stage = pxr::UsdStage::Open(filepath); if (!stage) { diff --git a/source/blender/io/usd/intern/usd_common.cc b/source/blender/io/usd/intern/usd_common.cc index 2b6b6f4ed43..e5a83442140 100644 --- a/source/blender/io/usd/intern/usd_common.cc +++ b/source/blender/io/usd/intern/usd_common.cc @@ -11,6 +11,10 @@ namespace blender::io::usd { void ensure_usd_plugin_path_registered() { + /* if PXR_PYTHON_SUPPORT_ENABLED is defined, we *must* be dynamic and + the plugins are placed relative to the USD shared library hence no + hinting is required. */ +#ifndef PXR_PYTHON_SUPPORT_ENABLED static bool plugin_path_registered = false; if (plugin_path_registered) { return; @@ -22,6 +26,7 @@ void ensure_usd_plugin_path_registered() const std::string blender_usd_datafiles = BKE_appdir_folder_id(BLENDER_DATAFILES, "usd"); /* The trailing slash indicates to the USD library that the path is a directory. */ pxr::PlugRegistry::GetInstance().RegisterPlugins(blender_usd_datafiles + "/"); +#endif } } // namespace blender::io::usd diff --git a/source/blender/io/usd/tests/usd_tests_common.cc b/source/blender/io/usd/tests/usd_tests_common.cc index 9f18a289433..d9285b3f3db 100644 --- a/source/blender/io/usd/tests/usd_tests_common.cc +++ b/source/blender/io/usd/tests/usd_tests_common.cc @@ -36,9 +36,12 @@ std::string register_usd_plugins_for_tests() BLI_assert(path_len + 1 < FILE_MAX); usd_datafiles_dir[path_len] = '/'; usd_datafiles_dir[path_len + 1] = '\0'; - + /* if PXR_PYTHON_SUPPORT_ENABLED is defined, we *must* be dynamic and + the plugins are placed relative to the USD shared library hence no + hinting is required. */ +#ifndef PXR_PYTHON_SUPPORT_ENABLED pxr::PlugRegistry::GetInstance().RegisterPlugins(usd_datafiles_dir); - +#endif return usd_datafiles_dir; } diff --git a/source/blender/io/usd/usd.h b/source/blender/io/usd/usd.h index 3494d8ffdc3..98d544df251 100644 --- a/source/blender/io/usd/usd.h +++ b/source/blender/io/usd/usd.h @@ -119,7 +119,7 @@ struct CacheReader *CacheReader_open_usd_object(struct CacheArchiveHandle *handl void USD_CacheReader_incref(struct CacheReader *reader); void USD_CacheReader_free(struct CacheReader *reader); - +void USD_ensure_plugin_path_registered(void); #ifdef __cplusplus } #endif diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 13a311cb55c..ed3e1f3b122 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -11,6 +11,7 @@ set(INC ../blender/editors/include ../blender/gpu ../blender/imbuf + ../blender/io/usd ../blender/makesdna ../blender/makesrna ../blender/render @@ -371,7 +372,6 @@ elseif(APPLE) set(TARGETDIR_LIB Blender.app/Contents/Resources/lib) set(TARGETDIR_TEXT Blender.app/Contents/Resources/text) endif() - # Skip re-linking on CPACK / install. set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true) endif() @@ -416,7 +416,12 @@ if(WITH_PYTHON) PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE ) - + if(WIN32) + install( + FILES ${CMAKE_SOURCE_DIR}/release/windows/python/usercustomize.py + DESTINATION ${TARGETDIR_VER}/python/lib/site-packages + ) + endif() unset(ADDON_EXCLUDE_CONDITIONAL) unset(FREESTYLE_EXCLUDE_CONDITIONAL) endif() @@ -488,6 +493,33 @@ if("${CMAKE_GENERATOR}" MATCHES ".*Makefiles.*") ) endif() +# macro to help install files without dragging in unnecessary data. +macro(install_dir from to) + install( + DIRECTORY ${from} + DESTINATION ${to} + # Irrelevant files and caches. + PATTERN ".git" EXCLUDE + PATTERN ".svn" EXCLUDE + PATTERN "*.pyc" EXCLUDE + PATTERN "*.pyo" EXCLUDE + PATTERN "*.orig" EXCLUDE + PATTERN "*.rej" EXCLUDE + PATTERN "__pycache__" EXCLUDE + PATTERN "__MACOSX" EXCLUDE + PATTERN ".DS_Store" EXCLUDE + # Unneeded Python files. + PATTERN "config-${PYTHON_VERSION}/*.a" EXCLUDE # static lib + PATTERN "lib2to3" EXCLUDE # ./lib2to3 + PATTERN "tkinter" EXCLUDE # ./tkinter + PATTERN "lib-dynload/_tkinter.*" EXCLUDE # ./lib-dynload/_tkinter.co + PATTERN "idlelib" EXCLUDE # ./idlelib + PATTERN "test" EXCLUDE # ./test + PATTERN "turtledemo" EXCLUDE # ./turtledemo + PATTERN "turtle.py" EXCLUDE # ./turtle.py + PATTERN "wininst*.exe" EXCLUDE # from distutils, avoid malware false positive + ) +endmacro() # ----------------------------------------------------------------------------- # Install Targets (Platform Specific) @@ -527,6 +559,7 @@ if(UNIX AND NOT APPLE) LIBRARY DESTINATION ${TARGETDIR_BPY} ) endif() + # none of the other files are needed currently elseif(WITH_INSTALL_PORTABLE) install( @@ -615,9 +648,21 @@ if(UNIX AND NOT APPLE) endif() endif() - if(WITH_PYTHON) - if(WITH_PYTHON_INSTALL) + if(WITH_PYTHON AND WITH_PYTHON_INSTALL) + # Install executable + install( + PROGRAMS ${PYTHON_EXECUTABLE} + DESTINATION ${TARGETDIR_VER}/python/bin + ) + if(EXISTS ${LIBDIR}) + # Precompiled libraries, copy over complete lib directory. + install_dir( + ${PYTHON_LIBPATH} + ${TARGETDIR_VER}/python + ) + else() + # System libraries. install( PROGRAMS ${PYTHON_EXECUTABLE} DESTINATION ${TARGETDIR_VER}/python/bin @@ -698,6 +743,24 @@ if(UNIX AND NOT APPLE) unset(_suffix) endif() + if(WITH_USD) + # Install to the same directory as the source, so debian-like + # distros are happy with their policy. + set(_suffix "site-packages") + if(${PYTHON_USD_PATH} MATCHES "dist-packages") + set(_suffix "dist-packages") + endif() + install( + DIRECTORY ${USD_LIBRARY_DIR}/python/ + DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix} + PATTERN ".svn" EXCLUDE + PATTERN "__pycache__" EXCLUDE # * any cache * + PATTERN "*.pyc" EXCLUDE # * any cache * + PATTERN "*.pyo" EXCLUDE # * any cache * + ) + unset(_suffix) + endif() + if(WITH_PYTHON_INSTALL_ZSTANDARD) # Install to the same directory as the source, so debian-like # distributions are happy with their policy. @@ -758,7 +821,6 @@ if(UNIX AND NOT APPLE) unset(_suffix) endif() unset(_target_LIB) - endif() endif() @@ -769,22 +831,22 @@ if(UNIX AND NOT APPLE) ) endif() elseif(WIN32) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/epoxy/bin/epoxy-0.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) if(WITH_OPENMP AND MSVC_CLANG) - install( + windows_install_shared_manifest( FILES ${CLANG_OPENMP_DLL} - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() if(WITH_FFTW3) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/fftw3/lib/libfftw3-3.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() if(MSVC_ASAN) @@ -799,34 +861,69 @@ elseif(WIN32) "this is an optional component during the MSVC install, please install it" ) endif() - install( + windows_install_shared_manifest( FILES ${ASAN_DLL} - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + RELEASE ) - install( + windows_install_shared_manifest( FILES ${ASAN_DEBUG_DLL} - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug + DEBUG ) unset(ASAN_DLL) unset(ASAN_DEBUG_DLL) endif() - + if(WITH_IMAGE_OPENEXR OR WITH_OPENIMAGEIO) + if(EXISTS ${LIBDIR}/openexr/bin/Iex.dll) + windows_install_shared_manifest( + FILES + ${LIBDIR}/openexr/bin/Iex.dll + ${LIBDIR}/openexr/bin/IlmThread.dll + ${LIBDIR}/openexr/bin/OpenEXRCore.dll + ${LIBDIR}/openexr/bin/OpenEXRUtil.dll + ${LIBDIR}/openexr/bin/OpenEXR.dll + ${LIBDIR}/imath/bin/imath.dll + RELEASE + ) + windows_install_shared_manifest( + FILES + ${LIBDIR}/openexr/bin/Iex_d.dll + ${LIBDIR}/openexr/bin/IlmThread_d.dll + ${LIBDIR}/openexr/bin/OpenEXRCore_d.dll + ${LIBDIR}/openexr/bin/OpenEXRUtil_d.dll + ${LIBDIR}/openexr/bin/OpenEXR_d.dll + ${LIBDIR}/imath/bin/imath_d.dll + DEBUG + ) + endif() + endif() + if(WITH_OPENIMAGEIO) + if(EXISTS ${LIBDIR}/openimageio/bin/openimageio.dll) + windows_install_shared_manifest( + FILES + ${LIBDIR}/openimageio/bin/openimageio.dll + ${LIBDIR}/openimageio/bin/openimageio_util.dll + RELEASE + ) + windows_install_shared_manifest( + FILES + ${LIBDIR}/openimageio/bin/openimageio_d.dll + ${LIBDIR}/openimageio/bin/openimageio_util_d.dll + DEBUG + ) + endif() + endif() if(WITH_GMP) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/gmp/lib/libgmp-10.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/gmp/lib/libgmpxx.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + RELEASE ) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/gmp/lib/libgmpxx_d.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug + DEBUG ) endif() @@ -846,16 +943,30 @@ elseif(WIN32) endif() if(WITH_OPENVDB) - install( - FILES ${LIBDIR}/openvdb/bin/openvdb.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel - ) - install( - FILES ${LIBDIR}/openvdb/bin/openvdb_d.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug - ) + windows_install_shared_manifest( + FILES ${LIBDIR}/openvdb/bin/openvdb.dll + RELEASE + ) + windows_install_shared_manifest( + FILES ${LIBDIR}/openvdb/bin/openvdb_d.dll + DEBUG + ) + + # This will not exist for 3.3 and earlier lib folders + # to ease the transition, support both 3.3 and 3.4 lib + # folders. + if(EXISTS ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd) + install( + FILES ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd + DESTINATION ${TARGETDIR_VER}/python/lib/site-packages + CONFIGURATIONS Debug + ) + install( + FILES ${LIBDIR}/openvdb/python/pyopenvdb.pyd + DESTINATION ${TARGETDIR_VER}/python/lib/site-packages + CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + ) + endif() endif() if(WITH_PYTHON) @@ -906,7 +1017,7 @@ elseif(WIN32) PATTERN ".svn" EXCLUDE PATTERN "__pycache__" EXCLUDE # * any cache * PATTERN "*.pyc" EXCLUDE # * any cache * - PATTERN "*.pyo" EXCLUDE # * any cache *) + PATTERN "*.pyo" EXCLUDE # * any cache * ) install( @@ -938,31 +1049,58 @@ elseif(WIN32) CONFIGURATIONS Debug ) + if(WITH_USD) + # This will not exist for 3.3 and earlier lib folders + # to ease the transition, support both 3.3 and 3.4 lib + # folders. + if(EXISTS ${USD_LIBRARY_DIR}/python/) + install( + DIRECTORY ${USD_LIBRARY_DIR}/python/ + DESTINATION ${TARGETDIR_VER}/python/lib/site-packages + CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + PATTERN ".svn" EXCLUDE + PATTERN "__pycache__" EXCLUDE # * any cache * + PATTERN "*.pyc" EXCLUDE # * any cache * + PATTERN "*.pyo" EXCLUDE # * any cache * + ) + endif() + if(EXISTS ${USD_LIBRARY_DIR}/debug/python/) + install( + DIRECTORY ${USD_LIBRARY_DIR}/debug/python/ + DESTINATION ${TARGETDIR_VER}/python/lib/site-packages + CONFIGURATIONS Debug + PATTERN ".svn" EXCLUDE + PATTERN "__pycache__" EXCLUDE # * any cache * + PATTERN "*.pyc" EXCLUDE # * any cache * + PATTERN "*.pyo" EXCLUDE # * any cache * + ) + endif() + endif() + if(WINDOWS_PYTHON_DEBUG) install( FILES ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}.pdb - DESTINATION ${TARGETDIR_LIB} + DESTINATION "." CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel ) install( FILES ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}_d.pdb - DESTINATION ${TARGETDIR_LIB} + DESTINATION "." CONFIGURATIONS Debug ) endif() endif() - unset(_PYTHON_VERSION_NO_DOTS) endif() if(WITH_CODEC_FFMPEG) # Filenames change slightly between FFMPEG versions check both 5.0 and fallback to 4.4 # to ease the transition between versions. if(EXISTS "${LIBDIR}/ffmpeg/lib/avcodec-59.dll") - install( + windows_install_shared_manifest( FILES ${LIBDIR}/ffmpeg/lib/avcodec-59.dll ${LIBDIR}/ffmpeg/lib/avformat-59.dll @@ -970,10 +1108,10 @@ elseif(WIN32) ${LIBDIR}/ffmpeg/lib/avutil-57.dll ${LIBDIR}/ffmpeg/lib/swscale-6.dll ${LIBDIR}/ffmpeg/lib/swresample-4.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) else() - install( + windows_install_shared_manifest( FILES ${LIBDIR}/ffmpeg/lib/avcodec-58.dll ${LIBDIR}/ffmpeg/lib/avformat-58.dll @@ -981,61 +1119,57 @@ elseif(WIN32) ${LIBDIR}/ffmpeg/lib/avutil-56.dll ${LIBDIR}/ffmpeg/lib/swscale-5.dll ${LIBDIR}/ffmpeg/lib/swresample-3.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() endif() if(WITH_TBB) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/tbb/bin/tbb.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + RELEASE ) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/tbb/bin/tbb_debug.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug + DEBUG ) endif() if(WITH_TBB_MALLOC_PROXY) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/tbb/bin/tbbmalloc.dll ${LIBDIR}/tbb/bin/tbbmalloc_proxy.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel + RELEASE ) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll ${LIBDIR}/tbb/bin/tbbmalloc_proxy_debug.dll - DESTINATION ${TARGETDIR_LIB} - CONFIGURATIONS Debug + DEBUG ) list(APPEND LIB ${TBB_MALLOC_LIBRARIES}) endif() if(WITH_CODEC_SNDFILE) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() if(WITH_OPENAL) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/openal/lib/OpenAL32.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() if(WITH_SDL) - install( + windows_install_shared_manifest( FILES ${LIBDIR}/sdl/lib/SDL2.dll - DESTINATION ${TARGETDIR_LIB} + ALL ) endif() @@ -1045,7 +1179,7 @@ elseif(WIN32) ${LIBDIR}/audaspace/lib/audaspace.dll ${LIBDIR}/audaspace/lib/audaspace-c.dll ${LIBDIR}/audaspace/lib/audaspace-py.dll - DESTINATION ${TARGETDIR_LIB} + DESTINATION "." ) endif() @@ -1294,12 +1428,61 @@ blender_target_include_dirs(blender ${INC}) # These files are required at runtime. if(WITH_USD) add_definitions(-DWITH_USD) - install( - DIRECTORY ${USD_LIBRARY_DIR}/usd - DESTINATION "${TARGETDIR_VER}/datafiles" - ) + blender_include_dirs(../blender/io/usd) + # On windows the usd library site in ./blender.shared copy the files + # relative to the location of the USD dll, if the dll does not exist + # assume we are linking against the static 3.4 lib. + if(WIN32 AND EXISTS ${LIBDIR}/usd/lib/usd_usd_ms.dll) + install(DIRECTORY + ${USD_LIBRARY_DIR}/usd + DESTINATION "./blender.shared" + ) + elseif(USD_PYTHON_SUPPORT) + install(DIRECTORY + ${USD_LIBRARY_DIR}/usd + DESTINATION ${TARGETDIR_LIB} + ) + else() + install(DIRECTORY + ${USD_LIBRARY_DIR}/usd + DESTINATION "${TARGETDIR_VER}/datafiles" + ) + endif() + if(WIN32) + # If this file exists we are building against a 3.4 library folder + # that needs these dll's installed. + if(EXISTS ${LIBDIR}/usd/lib/usd_usd_ms.dll) + windows_install_shared_manifest(FILES + ${LIBDIR}/usd/lib/usd_usd_ms.dll + RELEASE + ) + windows_install_shared_manifest(FILES + ${LIBDIR}/usd/lib/usd_usd_ms_d.dll + DEBUG + ) + endif() + endif() endif() +if(WIN32 AND WITH_BOOST) + set(BOOST_COMPONENTS atomic chrono date_time filesystem + iostreams locale program_options regex + serialization system thread wave wserialization + python${_PYTHON_VERSION_NO_DOTS} numpy${_PYTHON_VERSION_NO_DOTS} + ) + foreach(component ${BOOST_COMPONENTS}) + if(EXISTS ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_${component}-${BOOST_POSTFIX}.dll) + windows_install_shared_manifest( + FILES ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_${component}-${BOOST_POSTFIX}.dll + RELEASE + ) + windows_install_shared_manifest( + FILES ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_${component}-${BOOST_DEBUG_POSTFIX}.dll + DEBUG + ) + endif() + endforeach() +endif() # `vcpkg` substitutes our libraries with theirs, which will cause issues when you you run # these builds on other systems due to missing DLL's. So we opt out the use of `vcpkg`. @@ -1345,6 +1528,12 @@ if(WIN32 AND NOT WITH_PYTHON_MODULE) endif() # ----------------------------------------------------------------------------- +# Windows shared library manifest +if(WIN32) + windows_generate_shared_manifest() +endif() + +# ----------------------------------------------------------------------------- # Post-install script if(POSTINSTALL_SCRIPT) diff --git a/source/creator/creator.c b/source/creator/creator.c index 2cd54deeab5..7f5ebb9e8a6 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -94,6 +94,10 @@ # include "sdlew.h" #endif +#ifdef WITH_USD +# include "usd.h" +#endif + #include "creator_intern.h" /* Own include. */ /* -------------------------------------------------------------------- */ @@ -469,6 +473,10 @@ int main(int argc, /* Initialize sub-systems that use `BKE_appdir.h`. */ IMB_init(); +#ifdef WITH_USD + USD_ensure_plugin_path_registered(); +#endif + #ifndef WITH_PYTHON_MODULE /* First test for background-mode (#Global.background) */ BLI_args_parse(ba, ARG_PASS_SETTINGS, NULL, NULL); diff --git a/source/creator/symbols_apple.map b/source/creator/symbols_apple.map index 5619f151bd2..7514921f839 100644 --- a/source/creator/symbols_apple.map +++ b/source/creator/symbols_apple.map @@ -59,7 +59,6 @@ png_* *textFileFormatYy* *TIFF* *tinyformat* -*usdBlender* vorbis* vp8* vp9* |