From 988a38e0a9d028b6e21736779a73425e110d5757 Mon Sep 17 00:00:00 2001 From: Vittorio Romeo Date: Tue, 4 Apr 2023 15:54:41 +0200 Subject: [PATCH] Improve PCH by adding more commonly used headers --- src/SFML/PCH.hpp | 8 ++++++-- src/SFML/System/Win32/WindowsHeader.hpp | 8 ++++++++ src/SFML/Window/CMakeLists.txt | 3 --- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/SFML/PCH.hpp b/src/SFML/PCH.hpp index 42bff9134..8009cc5f0 100644 --- a/src/SFML/PCH.hpp +++ b/src/SFML/PCH.hpp @@ -32,10 +32,11 @@ #ifdef SFML_SYSTEM_WINDOWS -#define UNICODE 1 -#define _UNICODE 1 #include +#include +#include + #endif // SFML_SYSTEM_WINDOWS #include @@ -48,11 +49,14 @@ #include #include #include +#include #include #include #include +#include #include #include +#include #include #include #include diff --git a/src/SFML/System/Win32/WindowsHeader.hpp b/src/SFML/System/Win32/WindowsHeader.hpp index b9023edf4..9e07d374b 100644 --- a/src/SFML/System/Win32/WindowsHeader.hpp +++ b/src/SFML/System/Win32/WindowsHeader.hpp @@ -44,4 +44,12 @@ #define WINVER 0x0501 #endif +#ifndef UNICODE +#define UNICODE 1 +#endif + +#ifndef _UNICODE +#define _UNICODE 1 +#endif + #include diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index 03373128c..f4dadfe90 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -85,9 +85,6 @@ if(SFML_OS_WINDOWS) ) endif() 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) if(SFML_USE_DRM) add_definitions(-DSFML_USE_DRM)