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

View File

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

View File

@ -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)