cmake: Don't use PCH with Qt6.

This commit is contained in:
Admiral H. Curtiss 2022-05-22 01:19:44 +02:00
parent 6ea7af13e8
commit 580c721c82
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
19 changed files with 90 additions and 3 deletions

View File

@ -83,3 +83,8 @@ PRIVATE
cubeb
SoundTouch
FreeSurround)
if(MSVC)
# Add precompiled header
target_link_libraries(audiocommon PRIVATE use_pch)
endif()

View File

@ -311,8 +311,7 @@ endif()
if(MSVC)
# Add precompiled header
# it will propergate down to everything that depends on common
target_link_libraries(common PUBLIC use_pch)
target_link_libraries(common PRIVATE use_pch)
# We need to disable PCH for this one file, because it's C and our PCH is C++
set_source_files_properties(

View File

@ -702,3 +702,8 @@ if(UNIX)
MemoryWatcher.h
)
endif()
if(MSVC)
# Add precompiled header
target_link_libraries(core PRIVATE use_pch)
endif()

View File

@ -77,3 +77,8 @@ PRIVATE
pugixml
ZLIB::ZLIB
)
if(MSVC)
# Add precompiled header
target_link_libraries(discio PRIVATE use_pch)
endif()

View File

@ -26,6 +26,11 @@ PRIVATE
cpp-optparse
)
if(MSVC)
# Add precompiled header
target_link_libraries(dolphin-nogui PRIVATE use_pch)
endif()
if(USE_DISCORD_PRESENCE)
target_compile_definitions(dolphin-nogui PRIVATE -DUSE_DISCORD_PRESENCE)
endif()

View File

@ -396,6 +396,9 @@ if (MSVC)
# Qt6 requires RTTI
remove_cxx_flag_from_target(dolphin-emu "/GR-")
target_compile_options(dolphin-emu PRIVATE "/GR")
else()
# Add precompiled header
target_link_libraries(audiocommon PRIVATE use_pch)
endif()
endif()

View File

@ -19,5 +19,10 @@ PRIVATE
cpp-optparse
)
if(MSVC)
# Add precompiled header
target_link_libraries(dolphin-tool PRIVATE use_pch)
endif()
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-tool)
install(TARGETS dolphin-tool RUNTIME DESTINATION ${bindir})

View File

@ -205,3 +205,8 @@ if(ENABLE_SDL)
message(STATUS "SDL NOT found, disabling SDL input")
endif()
endif()
if(MSVC)
# Add precompiled header
target_link_libraries(inputcommon PRIVATE use_pch)
endif()

View File

@ -68,3 +68,8 @@ if(USE_DISCORD_PRESENCE)
target_compile_definitions(uicommon PRIVATE -DUSE_DISCORD_PRESENCE)
target_link_libraries(uicommon PRIVATE discord-rpc)
endif()
if(MSVC)
# Add precompiled header
target_link_libraries(uicommon PRIVATE use_pch)
endif()

View File

@ -11,3 +11,8 @@ target_link_libraries(updatercommon PRIVATE
ed25519
cpp-optparse
)
if(MSVC)
# Add precompiled header
target_link_libraries(updatercommon PRIVATE use_pch)
endif()

View File

@ -29,3 +29,8 @@ PUBLIC
videocommon
videod3dcommon
)
if(MSVC)
# Add precompiled header
target_link_libraries(videod3d PRIVATE use_pch)
endif()

View File

@ -35,3 +35,8 @@ PUBLIC
videocommon
videod3dcommon
)
if(MSVC)
# Add precompiled header
target_link_libraries(videod3d12 PRIVATE use_pch)
endif()

View File

@ -12,3 +12,8 @@ PUBLIC
common
videocommon
)
if(MSVC)
# Add precompiled header
target_link_libraries(videod3dcommon PRIVATE use_pch)
endif()

View File

@ -17,3 +17,8 @@ PUBLIC
common
videocommon
)
if(MSVC)
# Add precompiled header
target_link_libraries(videonull PRIVATE use_pch)
endif()

View File

@ -33,3 +33,8 @@ PUBLIC
PRIVATE
${X11_LIBRARIES}
)
if(MSVC)
# Add precompiled header
target_link_libraries(videoogl PRIVATE use_pch)
endif()

View File

@ -41,3 +41,8 @@ PUBLIC
common
videocommon
)
if(MSVC)
# Add precompiled header
target_link_libraries(videosoftware PRIVATE use_pch)
endif()

View File

@ -62,3 +62,8 @@ SYSTEM PRIVATE
${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV
${CMAKE_SOURCE_DIR}/Externals/glslang
)
if(MSVC)
# Add precompiled header
target_link_libraries(videovulkan PRIVATE use_pch)
endif()

View File

@ -180,3 +180,8 @@ if(FFmpeg_FOUND)
)
endif()
endif()
if(MSVC)
# Add precompiled header
target_link_libraries(videocommon PRIVATE use_pch)
endif()

View File

@ -12,3 +12,8 @@ target_link_libraries(winupdater PRIVATE
)
set_target_properties(winupdater PROPERTIES OUTPUT_NAME "Updater")
if(MSVC)
# Add precompiled header
target_link_libraries(winupdater PRIVATE use_pch)
endif()