diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b32611bc..e83a3d4c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,6 +140,10 @@ endif() # Custom default install location. if(BUILD_DLL) get_filename_component(DLL_INSTALL_PREFIX "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Games\\Command and Conquer Generals Zero Hour;InstallPath]" ABSOLUTE CACHE) + if(MSVC) + # Include INSTALL to build by default. This copies dll's and pdb's to game directory. + set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) + endif() endif() if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows") diff --git a/tools/build/win_scripts/vs_create_solution.bat b/tools/build/win_scripts/vs_create_solution.bat index c27520655..02ede41ad 100644 --- a/tools/build/win_scripts/vs_create_solution.bat +++ b/tools/build/win_scripts/vs_create_solution.bat @@ -14,8 +14,7 @@ cd /d "%SolutionDir%" "%CMakeDir%\bin\cmake.exe" ^ -G "%GeneratorName%" ^ -A Win32 ^ - -S "%ProjectDir%" ^ - -DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=1 + -S "%ProjectDir%" cd /d "%cd%" :: Open cmake gui for user customizations