From e8c18ca5e7fbb5e533ac8b5b9b81259eae6618cf Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 2 Nov 2023 16:35:40 +0100 Subject: [PATCH] (Windows) Added bundling of C++ libraries when building with MSVC --- es-app/CMakeLists.txt | 9 +++++---- tools/Windows_dependencies_setup_MSVC.bat | 5 +---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 1ea0c83a7..6305537e6 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -144,6 +144,10 @@ if(WIN32) install(TARGETS EmulationStation RUNTIME DESTINATION .) install(TARGETS es-pdf-convert RUNTIME DESTINATION es-pdf-converter) if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .) + if(CMAKE_BUILD_TYPE MATCHES Debug) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + endif() install(FILES ../avcodec-60.dll ../avfilter-9.dll ../avformat-60.dll @@ -159,13 +163,10 @@ if(WIN32) ../libcurl-x64.dll ../libssl-1_1-x64.dll ../lunasvg.dll - ../MSVCP140.dll ../pugixml.dll ../rlottie.dll ../SDL2.dll - ../VCOMP140.DLL - ../VCRUNTIME140.dll - ../VCRUNTIME140_1.dll + ../vcomp140.dll DESTINATION .) install(FILES ../es-pdf-converter/charset.dll ../es-pdf-converter/deflate.dll diff --git a/tools/Windows_dependencies_setup_MSVC.bat b/tools/Windows_dependencies_setup_MSVC.bat index 0ea8ee2bc..7a31f7aa6 100644 --- a/tools/Windows_dependencies_setup_MSVC.bat +++ b/tools/Windows_dependencies_setup_MSVC.bat @@ -326,10 +326,7 @@ if exist "C:\Program Files\OpenSSL-Win64\libcrypto-1_1-x64.dll" ( echo: echo Copying DLL files from Windows\System32 -copy /Y C:\Windows\System32\MSVCP140.dll -copy /Y C:\Windows\System32\VCOMP140.DLL -copy /Y C:\Windows\System32\VCRUNTIME140.dll -copy /Y C:\Windows\System32\VCRUNTIME140_1.dll +copy /Y C:\Windows\System32\vcomp140.dll echo: echo Done setting up all dependencies.