diff --git a/.github/scripts/windows.bat b/.github/scripts/windows.bat index a09db6c..e32b325 100644 --- a/.github/scripts/windows.bat +++ b/.github/scripts/windows.bat @@ -9,6 +9,19 @@ MKDIR install :: Build with x64 architecture in Release mode CD build +:: We set this to revert the incompatible ABI for MSVC STL. +:: See: https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-1710 +:: +:: Ideally, I can install new VCRedist to resolve this issue. +:: However, Blender embeds its own VCRedist when distribution which has lower VCRedist version. +:: And at the same time, Blender will load our BMap.dll built by new VCRedist, so it trigger the incompatible ABI issue. +:: +:: Currently, the VCRedist distributed by Blender 4.5 LTS is incompatible with our BMap.dll. +:: So I write it in script, rather than in CMake file, to temporaryly fix this issue. +:: +:: This fix also is written in dependency build scripts, please remove them together if you remove this, +:: when Blender migrate to the new VCRedist. +set CXXFLAGS=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR=1 cmake -A x64 -DCMAKE_CXX_STANDARD=23 -DNEMO_BUILD_UNVIRT=ON -DNEMO_BUILD_BALLANCE=ON -DNEMO_BUILD_BMAP=ON -DNEMO_BUILD_BMAPINSPECTOR=ON -DYYCCommonplace_ROOT=%YYCCommonplace_ROOT% -DSTB_ROOT=%STB_ROOT% -DZLIB_ROOT=%ZLIB_ROOT% ../.. cmake --build . --config Release cmake --install . --prefix=../install --config Release diff --git a/.github/scripts/yycc/windows.bat b/.github/scripts/yycc/windows.bat index e6568bf..15a4794 100644 --- a/.github/scripts/yycc/windows.bat +++ b/.github/scripts/yycc/windows.bat @@ -9,6 +9,7 @@ MKDIR install :: Build with x64 architecture in Release mode CD build +set CXXFLAGS=/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR=1 cmake -A x64 -DCMAKE_CXX_STANDARD=23 ../.. cmake --build . --config Release cmake --install . --prefix=../install --config Release