Skip to content

Commit

Permalink
Windows: having another go at fixing the MSVCP140.dll crash
Browse files Browse the repository at this point in the history
Closes: #929
  • Loading branch information
rgriebl committed Dec 16, 2024
1 parent 158894c commit 51d0e01
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ elseif (LINUX)
endif()
endif()

if (WIN32)
# MS broke backwards compatibility with the 17.10 MSVC2022 release:
# without this workaround, every thread started via QThread::create crashes
# in std::mutex.lock inside MSVCP140.dll
# We DO deploy the correct MSVC runtime, but there are sentry reports where
# Windows is loading the wrong (old) runtime from a OneDrive installation,
# but there's no indication why that is happening.
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()

set(BS_LIBSECRET OFF)
if (LINUX AND (BS_DESKTOP OR BS_MOBILE))
find_package(PkgConfig REQUIRED)
Expand Down

0 comments on commit 51d0e01

Please sign in to comment.