summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ameerj2022-11-22 18:38:23 -0500
committerGravatar ameerj2022-11-29 18:50:49 -0500
commit37bc5118ea8f5891741faba8963ce9ae5f88e946 (patch)
tree0beccc4f6ee5ddc627ddf59edebc659ce0611074
parentexternals: Update dynarmic (diff)
downloadyuzu-37bc5118ea8f5891741faba8963ce9ae5f88e946.tar.gz
yuzu-37bc5118ea8f5891741faba8963ce9ae5f88e946.tar.xz
yuzu-37bc5118ea8f5891741faba8963ce9ae5f88e946.zip
CMake: Use precompiled headers
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/audio_core/CMakeLists.txt5
-rw-r--r--src/audio_core/precompiled_headers.h12
-rw-r--r--src/common/CMakeLists.txt6
-rw-r--r--src/common/precompiled_headers.h12
-rw-r--r--src/core/CMakeLists.txt5
-rw-r--r--src/core/precompiled_headers.h14
-rw-r--r--src/dedicated_room/CMakeLists.txt5
-rw-r--r--src/dedicated_room/precompiled_headers.h12
-rw-r--r--src/input_common/CMakeLists.txt5
-rw-r--r--src/input_common/precompiled_headers.h12
-rw-r--r--src/network/CMakeLists.txt5
-rw-r--r--src/network/precompiled_headers.h12
-rw-r--r--src/shader_recompiler/CMakeLists.txt5
-rw-r--r--src/shader_recompiler/precompiled_headers.h13
-rw-r--r--src/tests/CMakeLists.txt5
-rw-r--r--src/tests/precompiled_headers.h12
-rw-r--r--src/video_core/CMakeLists.txt5
-rw-r--r--src/video_core/precompiled_headers.h12
-rw-r--r--src/web_service/CMakeLists.txt5
-rw-r--r--src/web_service/precompiled_headers.h12
-rw-r--r--src/yuzu/CMakeLists.txt5
-rw-r--r--src/yuzu/precompiled_headers.h12
-rw-r--r--src/yuzu_cmd/CMakeLists.txt5
-rw-r--r--src/yuzu_cmd/precompiled_headers.h12
26 files changed, 216 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d2761ec1..901a04857 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,8 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
43 43
44option(YUZU_TESTS "Compile tests" ON) 44option(YUZU_TESTS "Compile tests" ON)
45 45
46option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
47
46CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF) 48CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF)
47 49
48option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}") 50option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0ac3d254e..25703e9d5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -82,8 +82,9 @@ if (MSVC)
82 /wd4324 # 'struct_name': structure was padded due to __declspec(align()) 82 /wd4324 # 'struct_name': structure was padded due to __declspec(align())
83 ) 83 )
84 84
85 if (USE_CCACHE) 85 if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
86 # when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format 86 # when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format
87 # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
87 add_compile_options(/Z7) 88 add_compile_options(/Z7)
88 else() 89 else()
89 add_compile_options(/Zi) 90 add_compile_options(/Zi)
@@ -151,6 +152,10 @@ else()
151 endif() 152 endif()
152endif() 153endif()
153 154
155if (YUZU_USE_PRECOMPILED_HEADERS)
156 set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
157endif()
158
154add_subdirectory(common) 159add_subdirectory(common)
155add_subdirectory(core) 160add_subdirectory(core)
156add_subdirectory(audio_core) 161add_subdirectory(audio_core)
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt
index 8e3a8f5a8..0a8c4280c 100644
--- a/src/audio_core/CMakeLists.txt
+++ b/src/audio_core/CMakeLists.txt
@@ -31,6 +31,7 @@ add_library(audio_core STATIC
31 out/audio_out.h 31 out/audio_out.h
32 out/audio_out_system.cpp 32 out/audio_out_system.cpp
33 out/audio_out_system.h 33 out/audio_out_system.h
34 precompiled_headers.h
34 renderer/adsp/adsp.cpp 35 renderer/adsp/adsp.cpp
35 renderer/adsp/adsp.h 36 renderer/adsp/adsp.h
36 renderer/adsp/audio_renderer.cpp 37 renderer/adsp/audio_renderer.cpp
@@ -229,3 +230,7 @@ if(ENABLE_SDL2)
229 target_link_libraries(audio_core PRIVATE SDL2) 230 target_link_libraries(audio_core PRIVATE SDL2)
230 target_compile_definitions(audio_core PRIVATE HAVE_SDL2) 231 target_compile_definitions(audio_core PRIVATE HAVE_SDL2)
231endif() 232endif()
233
234if (YUZU_USE_PRECOMPILED_HEADERS)
235 target_precompile_headers(audio_core PRIVATE precompiled_headers.h)
236endif()
diff --git a/src/audio_core/precompiled_headers.h b/src/audio_core/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/audio_core/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index b7c15c191..25fe5f56f 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -95,6 +95,7 @@ add_library(common STATIC
95 param_package.h 95 param_package.h
96 parent_of_member.h 96 parent_of_member.h
97 point.h 97 point.h
98 precompiled_headers.h
98 quaternion.h 99 quaternion.h
99 reader_writer_queue.h 100 reader_writer_queue.h
100 ring_buffer.h 101 ring_buffer.h
@@ -183,3 +184,8 @@ else()
183 target_link_libraries(common PRIVATE 184 target_link_libraries(common PRIVATE
184 $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>) 185 $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
185endif() 186endif()
187
188if (YUZU_USE_PRECOMPILED_HEADERS)
189 target_precompile_headers(common PRIVATE precompiled_headers.h)
190 set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
191endif()
diff --git a/src/common/precompiled_headers.h b/src/common/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/common/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 5629980d9..6530d3c60 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -771,6 +771,7 @@ add_library(core STATIC
771 memory.h 771 memory.h
772 perf_stats.cpp 772 perf_stats.cpp
773 perf_stats.h 773 perf_stats.h
774 precompiled_headers.h
774 reporter.cpp 775 reporter.cpp
775 reporter.h 776 reporter.h
776 telemetry_session.cpp 777 telemetry_session.cpp
@@ -825,3 +826,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
825 ) 826 )
826 target_link_libraries(core PRIVATE dynarmic) 827 target_link_libraries(core PRIVATE dynarmic)
827endif() 828endif()
829
830if (YUZU_USE_PRECOMPILED_HEADERS)
831 target_precompile_headers(core PRIVATE precompiled_headers.h)
832endif()
diff --git a/src/core/precompiled_headers.h b/src/core/precompiled_headers.h
new file mode 100644
index 000000000..d224877ea
--- /dev/null
+++ b/src/core/precompiled_headers.h
@@ -0,0 +1,14 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <boost/container/flat_map.hpp> // used by service.h which is heavily included
11#include <boost/intrusive/rbtree.hpp> // used by k_auto_object.h which is heavily included
12#include <fmt/format.h>
13
14#include "common/assert.h"
diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt
index 2d9731f19..5bbe1d4b5 100644
--- a/src/dedicated_room/CMakeLists.txt
+++ b/src/dedicated_room/CMakeLists.txt
@@ -4,6 +4,7 @@
4set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) 4set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
5 5
6add_executable(yuzu-room 6add_executable(yuzu-room
7 precompiled_headers.h
7 yuzu_room.cpp 8 yuzu_room.cpp
8 yuzu_room.rc 9 yuzu_room.rc
9) 10)
@@ -25,3 +26,7 @@ target_link_libraries(yuzu-room PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
25if(UNIX AND NOT APPLE) 26if(UNIX AND NOT APPLE)
26 install(TARGETS yuzu-room) 27 install(TARGETS yuzu-room)
27endif() 28endif()
29
30if (YUZU_USE_PRECOMPILED_HEADERS)
31 target_precompile_headers(yuzu-room PRIVATE precompiled_headers.h)
32endif()
diff --git a/src/dedicated_room/precompiled_headers.h b/src/dedicated_room/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/dedicated_room/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt
index cc6f0ffc0..77bfe4b58 100644
--- a/src/input_common/CMakeLists.txt
+++ b/src/input_common/CMakeLists.txt
@@ -34,6 +34,7 @@ add_library(input_common STATIC
34 input_poller.h 34 input_poller.h
35 main.cpp 35 main.cpp
36 main.h 36 main.h
37 precompiled_headers.h
37) 38)
38 39
39if (MSVC) 40if (MSVC)
@@ -63,3 +64,7 @@ target_link_libraries(input_common PRIVATE usb)
63 64
64create_target_directory_groups(input_common) 65create_target_directory_groups(input_common)
65target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost) 66target_link_libraries(input_common PUBLIC core PRIVATE common Boost::boost)
67
68if (YUZU_USE_PRECOMPILED_HEADERS)
69 target_precompile_headers(input_common PRIVATE precompiled_headers.h)
70endif()
diff --git a/src/input_common/precompiled_headers.h b/src/input_common/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/input_common/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index 6f8ca4b90..c85c308de 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -8,6 +8,7 @@ add_library(network STATIC
8 network.h 8 network.h
9 packet.cpp 9 packet.cpp
10 packet.h 10 packet.h
11 precompiled_headers.h
11 room.cpp 12 room.cpp
12 room.h 13 room.h
13 room_member.cpp 14 room_member.cpp
@@ -23,3 +24,7 @@ if (ENABLE_WEB_SERVICE)
23 target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE) 24 target_compile_definitions(network PRIVATE -DENABLE_WEB_SERVICE)
24 target_link_libraries(network PRIVATE web_service) 25 target_link_libraries(network PRIVATE web_service)
25endif() 26endif()
27
28if (YUZU_USE_PRECOMPILED_HEADERS)
29 target_precompile_headers(network PRIVATE precompiled_headers.h)
30endif()
diff --git a/src/network/precompiled_headers.h b/src/network/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/network/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt
index 545d69c7e..967ec9ba7 100644
--- a/src/shader_recompiler/CMakeLists.txt
+++ b/src/shader_recompiler/CMakeLists.txt
@@ -230,6 +230,7 @@ add_library(shader_recompiler STATIC
230 ir_opt/texture_pass.cpp 230 ir_opt/texture_pass.cpp
231 ir_opt/verification_pass.cpp 231 ir_opt/verification_pass.cpp
232 object_pool.h 232 object_pool.h
233 precompiled_headers.h
233 profile.h 234 profile.h
234 program_header.h 235 program_header.h
235 runtime_info.h 236 runtime_info.h
@@ -258,3 +259,7 @@ else()
258endif() 259endif()
259 260
260create_target_directory_groups(shader_recompiler) 261create_target_directory_groups(shader_recompiler)
262
263if (YUZU_USE_PRECOMPILED_HEADERS)
264 target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.h)
265endif()
diff --git a/src/shader_recompiler/precompiled_headers.h b/src/shader_recompiler/precompiled_headers.h
new file mode 100644
index 000000000..bd8f64a2e
--- /dev/null
+++ b/src/shader_recompiler/precompiled_headers.h
@@ -0,0 +1,13 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
13#include "frontend/maxwell/translate/impl/impl.h"
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 43ad2c7ff..348d1edf4 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -11,6 +11,7 @@ add_executable(tests
11 common/unique_function.cpp 11 common/unique_function.cpp
12 core/core_timing.cpp 12 core/core_timing.cpp
13 core/internal_network/network.cpp 13 core/internal_network/network.cpp
14 precompiled_headers.h
14 tests.cpp 15 tests.cpp
15 video_core/buffer_base.cpp 16 video_core/buffer_base.cpp
16 input_common/calibration_configuration_job.cpp 17 input_common/calibration_configuration_job.cpp
@@ -22,3 +23,7 @@ target_link_libraries(tests PRIVATE common core input_common)
22target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Catch2::Catch2 Threads::Threads) 23target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Catch2::Catch2 Threads::Threads)
23 24
24add_test(NAME tests COMMAND tests) 25add_test(NAME tests COMMAND tests)
26
27if (YUZU_USE_PRECOMPILED_HEADERS)
28 target_precompile_headers(tests PRIVATE precompiled_headers.h)
29endif()
diff --git a/src/tests/precompiled_headers.h b/src/tests/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/tests/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index b03a30992..97609ded4 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -84,6 +84,7 @@ add_library(video_core STATIC
84 gpu_thread.h 84 gpu_thread.h
85 memory_manager.cpp 85 memory_manager.cpp
86 memory_manager.h 86 memory_manager.h
87 precompiled_headers.h
87 pte_kind.h 88 pte_kind.h
88 query_cache.h 89 query_cache.h
89 rasterizer_accelerated.cpp 90 rasterizer_accelerated.cpp
@@ -300,3 +301,7 @@ endif()
300if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) 301if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
301 target_link_libraries(video_core PRIVATE dynarmic) 302 target_link_libraries(video_core PRIVATE dynarmic)
302endif() 303endif()
304
305if (YUZU_USE_PRECOMPILED_HEADERS)
306 target_precompile_headers(video_core PRIVATE precompiled_headers.h)
307endif()
diff --git a/src/video_core/precompiled_headers.h b/src/video_core/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/video_core/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt
index 3f75d97d1..19534b9e4 100644
--- a/src/web_service/CMakeLists.txt
+++ b/src/web_service/CMakeLists.txt
@@ -4,6 +4,7 @@
4add_library(web_service STATIC 4add_library(web_service STATIC
5 announce_room_json.cpp 5 announce_room_json.cpp
6 announce_room_json.h 6 announce_room_json.h
7 precompiled_headers.h
7 telemetry_json.cpp 8 telemetry_json.cpp
8 telemetry_json.h 9 telemetry_json.h
9 verify_login.cpp 10 verify_login.cpp
@@ -17,3 +18,7 @@ add_library(web_service STATIC
17 18
18create_target_directory_groups(web_service) 19create_target_directory_groups(web_service)
19target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib cpp-jwt) 20target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib cpp-jwt)
21
22if (YUZU_USE_PRECOMPILED_HEADERS)
23 target_precompile_headers(web_service PRIVATE precompiled_headers.h)
24endif()
diff --git a/src/web_service/precompiled_headers.h b/src/web_service/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/web_service/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index 0aa109dd3..4de45c9ba 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -186,6 +186,7 @@ add_executable(yuzu
186 multiplayer/state.cpp 186 multiplayer/state.cpp
187 multiplayer/state.h 187 multiplayer/state.h
188 multiplayer/validation.h 188 multiplayer/validation.h
189 precompiled_headers.h
189 startup_checks.cpp 190 startup_checks.cpp
190 startup_checks.h 191 startup_checks.h
191 uisettings.cpp 192 uisettings.cpp
@@ -405,3 +406,7 @@ endif()
405if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) 406if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
406 target_link_libraries(yuzu PRIVATE dynarmic) 407 target_link_libraries(yuzu PRIVATE dynarmic)
407endif() 408endif()
409
410if (YUZU_USE_PRECOMPILED_HEADERS)
411 target_precompile_headers(yuzu PRIVATE precompiled_headers.h)
412endif()
diff --git a/src/yuzu/precompiled_headers.h b/src/yuzu/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/yuzu/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt
index 7d8ca3d8a..daabf608d 100644
--- a/src/yuzu_cmd/CMakeLists.txt
+++ b/src/yuzu_cmd/CMakeLists.txt
@@ -24,6 +24,7 @@ add_executable(yuzu-cmd
24 emu_window/emu_window_sdl2_gl.h 24 emu_window/emu_window_sdl2_gl.h
25 emu_window/emu_window_sdl2_vk.cpp 25 emu_window/emu_window_sdl2_vk.cpp
26 emu_window/emu_window_sdl2_vk.h 26 emu_window/emu_window_sdl2_vk.h
27 precompiled_headers.h
27 yuzu.cpp 28 yuzu.cpp
28 yuzu.rc 29 yuzu.rc
29) 30)
@@ -55,3 +56,7 @@ if (MSVC)
55 include(CopyYuzuSDLDeps) 56 include(CopyYuzuSDLDeps)
56 copy_yuzu_SDL_deps(yuzu-cmd) 57 copy_yuzu_SDL_deps(yuzu-cmd)
57endif() 58endif()
59
60if (YUZU_USE_PRECOMPILED_HEADERS)
61 target_precompile_headers(yuzu-cmd PRIVATE precompiled_headers.h)
62endif()
diff --git a/src/yuzu_cmd/precompiled_headers.h b/src/yuzu_cmd/precompiled_headers.h
new file mode 100644
index 000000000..5f81bef98
--- /dev/null
+++ b/src/yuzu_cmd/precompiled_headers.h
@@ -0,0 +1,12 @@
1// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <algorithm>
7#include <chrono>
8#include <memory>
9
10#include <fmt/format.h>
11
12#include "common/assert.h"