mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
cmake: fix MSVC PCH support
I'm not sure if the previous implementation ever worked.
This commit is contained in:
parent
2348017ee8
commit
0909e00117
5 changed files with 37 additions and 6 deletions
|
@ -308,3 +308,14 @@ if(UNIX)
|
|||
elseif(WIN32)
|
||||
target_link_libraries(common PRIVATE "-INCLUDE:enableCompatPatches")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Add precompiled header
|
||||
# it will propergate down to everything that depends on common
|
||||
target_link_libraries(common PUBLIC pch)
|
||||
|
||||
# We need to disable PCH for this one file, because it's C and our PCH is C++
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ImageC.c
|
||||
PROPERTIES COMPILE_FLAGS "/Y- /I${CMAKE_SOURCE_DIR}/Source/PCH/nopch")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue