Improve PCH by adding more commonly used headers

This commit is contained in:
Vittorio Romeo 2023-04-04 15:54:41 +02:00
parent 6a3feda5ab
commit 988a38e0a9
3 changed files with 14 additions and 5 deletions

View File

@ -32,10 +32,11 @@
#ifdef SFML_SYSTEM_WINDOWS #ifdef SFML_SYSTEM_WINDOWS
#define UNICODE 1
#define _UNICODE 1
#include <SFML/System/Win32/WindowsHeader.hpp> #include <SFML/System/Win32/WindowsHeader.hpp>
#include <dinput.h>
#include <mmsystem.h>
#endif // SFML_SYSTEM_WINDOWS #endif // SFML_SYSTEM_WINDOWS
#include <SFML/System/Err.hpp> #include <SFML/System/Err.hpp>
@ -48,11 +49,14 @@
#include <chrono> #include <chrono>
#include <cmath> #include <cmath>
#include <cstdint> #include <cstdint>
#include <cstdlib>
#include <cstring> #include <cstring>
#include <filesystem> #include <filesystem>
#include <iostream> #include <iostream>
#include <locale>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <optional>
#include <ostream> #include <ostream>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>

View File

@ -44,4 +44,12 @@
#define WINVER 0x0501 #define WINVER 0x0501
#endif #endif
#ifndef UNICODE
#define UNICODE 1
#endif
#ifndef _UNICODE
#define _UNICODE 1
#endif
#include <windows.h> #include <windows.h>

View File

@ -85,9 +85,6 @@ if(SFML_OS_WINDOWS)
) )
endif() endif()
source_group("windows" FILES ${PLATFORM_SRC}) source_group("windows" FILES ${PLATFORM_SRC})
# make sure that we use the Unicode version of the Win API functions
add_definitions(-DUNICODE -D_UNICODE)
elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD) elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
if(SFML_USE_DRM) if(SFML_USE_DRM)
add_definitions(-DSFML_USE_DRM) add_definitions(-DSFML_USE_DRM)