mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00:00
CMake/Windows: Add PCH support
This commit is contained in:
parent
481b7cd085
commit
bab00088d4
2 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,10 @@ if (MSVC)
|
||||||
# All files are encoded as UTF-8
|
# All files are encoded as UTF-8
|
||||||
add_compile_options(/utf-8)
|
add_compile_options(/utf-8)
|
||||||
|
|
||||||
|
# Use PCH
|
||||||
|
add_subdirectory(PCH)
|
||||||
|
add_definitions(/I${PCH_DIRECTORY})
|
||||||
|
add_definitions(/Yu${PCH_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# These aren't actually needed for C11/C++11
|
# These aren't actually needed for C11/C++11
|
||||||
|
|
4
Source/PCH/CMakeLists.txt
Normal file
4
Source/PCH/CMakeLists.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
add_library(pch pch.h pch.cpp)
|
||||||
|
set(PCH_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
set(PCH_NAME ${PCH.pch})
|
||||||
|
target_compile_options(pch PUBLIC /Ycpch.h /Fp${PCH_DIRECTORY}/${PCH_NAME})
|
Loading…
Add table
Add a link
Reference in a new issue