diff --git a/msvc-full-features/Cataclysm-common.props b/msvc-full-features/Cataclysm-common.props index c87bed68c98fb..832e0c55d5e3d 100644 --- a/msvc-full-features/Cataclysm-common.props +++ b/msvc-full-features/Cataclysm-common.props @@ -51,12 +51,13 @@ false /bigobj /utf-8 %(AdditionalOptions) stdcpp17 - $(MSBuildThisFileDirectory)..\src;$(MSBuildThisFileDirectory)..\src\third-party;%(AdditionalIncludeDirectories) + $(MSBuildThisFileDirectory)..\pch;$(MSBuildThisFileDirectory)..\src;$(MSBuildThisFileDirectory)..\src\third-party;%(AdditionalIncludeDirectories) Use - stdafx.h + $(MSBuildThisFileDirectory)..\pch\main-pch.hpp 4661;4819;4146;26495;26444;26451;4068;6319;6237 _SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;LOCALIZE;USE_VCPKG;%(PreprocessorDefinitions) true + $(MSBuildThisFileDirectory)..\pch\main-pch.hpp RELEASE;%(PreprocessorDefinitions) @@ -145,7 +146,7 @@ - + diff --git a/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj b/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj index 580dd541fbd3c..e5d03093cee85 100644 --- a/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj +++ b/msvc-full-features/Cataclysm-lib-vcpkg-static.vcxproj @@ -118,7 +118,7 @@ - _CONSOLE;SDL_SOUND;SDL_BUILDING_LIBRARY;%(PreprocessorDefinitions) + _CONSOLE;SDL_SOUND;%(PreprocessorDefinitions) ..\msvc-full-features\prebuild.cmd diff --git a/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj b/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj index e527b909c80f9..a87b84753cd39 100644 --- a/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj +++ b/msvc-full-features/Cataclysm-test-vcpkg-static.vcxproj @@ -192,4 +192,4 @@ - \ No newline at end of file + diff --git a/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj b/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj index 1aaa02de97e62..2e127c04f5bdb 100644 --- a/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj +++ b/msvc-full-features/JsonFormatter-lib-vcpkg-static.vcxproj @@ -1,137 +1,137 @@ - - - - - Debug - ARM64EC - - - Debug - x64 - - - Debug - Win32 - - - Release - ARM64EC - - - Release - x64 - - - Release - Win32 - - - - 16.0 - {534A4E38-96A1-40E4-BDA7-8D17607F0270} - Win32Proj - JsonFormatterLib - 10.0 - x86-windows-static - x64-windows-static - x64-windows-static - - - true - true - false - true - true - x86-windows-static - x64-windows-static - x64-windows-static - $(Configuration) - - - - StaticLibrary - $(DefaultPlatformToolset) - MultiByte - - - true - - - false - false - - - x64 - - - - - - - - - - - - $(ProjectName)-$(Configuration)-$(Platform) - .lib - $(CDDA_ROOT)tools\format\ - - - true - - - false - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - Disabled - false - _DEBUG;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - MaxSpeed - true - true - DebugFastLink - MultiThreaded - - - true - true - - - - - WIN32;%(PreprocessorDefinitions) - - - - - - - - - - - - - {0009bb11-11ad-4c14-a5fc-d882a942c00b} - false - - - - - - \ No newline at end of file + + + + + Debug + ARM64EC + + + Debug + x64 + + + Debug + Win32 + + + Release + ARM64EC + + + Release + x64 + + + Release + Win32 + + + + 16.0 + {534A4E38-96A1-40E4-BDA7-8D17607F0270} + Win32Proj + JsonFormatterLib + 10.0 + x86-windows-static + x64-windows-static + x64-windows-static + + + true + true + false + true + true + x86-windows-static + x64-windows-static + x64-windows-static + $(Configuration) + + + + StaticLibrary + $(DefaultPlatformToolset) + MultiByte + + + true + + + false + false + + + x64 + + + + + + + + + + + + $(ProjectName)-$(Configuration)-$(Platform) + .lib + $(CDDA_ROOT)tools\format\ + + + true + + + false + + + + _CONSOLE;%(PreprocessorDefinitions) + + + Console + + + + + Disabled + false + _DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + MaxSpeed + true + true + DebugFastLink + MultiThreaded + + + true + true + + + + + WIN32;%(PreprocessorDefinitions) + + + + + + + + + + + + + {0009bb11-11ad-4c14-a5fc-d882a942c00b} + false + + + + + + diff --git a/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj b/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj index 1238e3d7df4b1..e5e519ed7c6df 100644 --- a/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj +++ b/msvc-full-features/JsonFormatter-vcpkg-static.vcxproj @@ -151,4 +151,4 @@ - \ No newline at end of file + diff --git a/msvc-full-features/flatbuffers.vcxproj b/msvc-full-features/flatbuffers.vcxproj index 16294543365b6..2be7a358ed39b 100644 --- a/msvc-full-features/flatbuffers.vcxproj +++ b/msvc-full-features/flatbuffers.vcxproj @@ -125,4 +125,4 @@ - \ No newline at end of file + diff --git a/msvc-full-features/stdafx.cpp b/msvc-full-features/stdafx.cpp index fd4f341c7b247..11bbb2ea4ad14 100644 --- a/msvc-full-features/stdafx.cpp +++ b/msvc-full-features/stdafx.cpp @@ -1 +1 @@ -#include "stdafx.h" +#include "main-pch.hpp" diff --git a/msvc-full-features/stdafx.h b/msvc-full-features/stdafx.h deleted file mode 100644 index 5ac8001a2be80..0000000000000 --- a/msvc-full-features/stdafx.h +++ /dev/null @@ -1,95 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "../src/platform_win.h" - -#if defined(TILES) -# if defined(_MSC_VER) && defined(USE_VCPKG) -# include -# include -# include -# include -# ifdef SDL_SOUND -# include -# endif -# else -# include -# include -# include -# include -# ifdef SDL_SOUND -# include -# endif -# endif -#endif diff --git a/pch/main-pch.hpp b/pch/main-pch.hpp index 73622a9f2215b..070c69df315f0 100644 --- a/pch/main-pch.hpp +++ b/pch/main-pch.hpp @@ -1,3 +1,5 @@ +#pragma once + // Workaround to a bug in libstdc++ prior to GCC 11 causing // Error: attempt to self move assign. // when compiling with _GLIBCXX_DEBUG @@ -10,17 +12,23 @@ #endif #endif +// Common to all build targets #include #include #include #include #include +#include +#include #include #include +#include #include #include #include +#include #include +#include #include #include #include @@ -29,6 +37,8 @@ #include #include #include +#include +#include #include #include #include @@ -38,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -56,20 +67,30 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include #include #include - #include + +#if defined(_MSC_VER) +# include "platform_win.h" +#endif + +#if defined(TILES) +# include +#endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7cc34b866ffd9..a172dd5b664ef 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,6 +27,7 @@ if (BUILD_TESTING) add_dependencies(cata_test-tiles test_mo) endif() target_link_libraries(cata_test-tiles PRIVATE cataclysm-tiles-common) + target_compile_definitions(cata_test-tiles PUBLIC SDL_MAIN_HANDLED) add_test(NAME cata.tiles.default COMMAND cata_test-tiles --rng-seed time WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})