From 489db1ab0261ddfba6a9c436800c74c06317e8b4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 25 Dec 2023 01:22:40 +1000 Subject: [PATCH 1/2] CMake: Don't compile PrecompiledHeader.cpp --- common/CMakeLists.txt | 2 ++ pcsx2-qt/CMakeLists.txt | 1 + pcsx2/CMakeLists.txt | 1 + 3 files changed, 4 insertions(+) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index ec91e68f923de..a70f71eef4482 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -131,6 +131,8 @@ target_sources(common PRIVATE Darwin/DarwinMisc.h ) +set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE) + if(USE_VTUNE) target_link_libraries(common PUBLIC Vtune::Vtune) endif() diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt index 697221e11951c..92871895595e1 100644 --- a/pcsx2-qt/CMakeLists.txt +++ b/pcsx2-qt/CMakeLists.txt @@ -179,6 +179,7 @@ target_sources(pcsx2-qt PRIVATE file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Translations/*.ts) target_precompile_headers(pcsx2-qt PRIVATE PrecompiledHeader.h) +set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE) target_include_directories(pcsx2-qt PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS} diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index c8db702407980..1b8641609f7af 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1188,6 +1188,7 @@ target_compile_definitions(PCSX2_FLAGS INTERFACE XBYAK_NO_EXCEPTION ) +set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE) if(COMMAND target_precompile_headers) message("Using precompiled headers.") target_precompile_headers(PCSX2_FLAGS INTERFACE PrecompiledHeader.h) From e28199653b8581da4d21a21334becf88ca6401d8 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 25 Dec 2023 01:23:10 +1000 Subject: [PATCH 2/2] MSBuild: Don't supply PrecompiledHeader.h to moc Redundant, since it's force included anyway. --- common/vsprops/QtCompile.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/vsprops/QtCompile.props b/common/vsprops/QtCompile.props index a9e902175697f..2d9fe164a5337 100644 --- a/common/vsprops/QtCompile.props +++ b/common/vsprops/QtCompile.props @@ -89,7 +89,7 @@ - +