Skip to content

Commit c727ee9

Browse files
committed
Work around InstallRequiredSystemLibraries broken in VS2019.
1 parent 59fe235 commit c727ee9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,10 @@ ExternalProject_Add(
110110

111111
install(DIRECTORY "${INTERNAL_INSTALL_PREFIX}/" DESTINATION "${CMAKE_INSTALL_PREFIX}")
112112
install(SCRIPT dechamps_CMakeUtils/InstallPdbFiles.cmake)
113+
114+
# Work around https://developercommunity.visualstudio.com/content/problem/618088/cmake-msvc-toolset-version-is-incorrect-in-visual.html
115+
# Note that for InstallRequiredSystemLibraries to work you might also need to work around https://developercommunity.visualstudio.com/content/problem/618084/cmake-installrequiredsystemlibraries-broken-in-lat.html
116+
if (MSVC_VERSION EQUAL 1921 AND MSVC_TOOLSET_VERSION EQUAL 141)
117+
set(MSVC_TOOLSET_VERSION 142)
118+
endif()
113119
include(InstallRequiredSystemLibraries)

src/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ cmake -P installer.cmake
2727

2828
Note that for this command to work, you need to have [Inno Setup][] installed.
2929

30+
## Troubleshooting
31+
32+
### VC runtime DLLs are not included in the installation
33+
34+
See this [Visual Studio 2019 bug][InstallRequiredSystemLibraries].
35+
3036
[ASIO SDK]: http://www.steinberg.net/en/company/developer.html
3137
[Inno Setup]: http://www.jrsoftware.org/isdl.php
38+
[InstallRequiredSystemLibraries]: https://developercommunity.visualstudio.com/content/problem/618084/cmake-installrequiredsystemlibraries-broken-in-lat.html
3239
[PortAudio]: http://www.portaudio.com/
3340
[tinytoml]: https://github.com/mayah/tinytoml

0 commit comments

Comments
 (0)