From 59949c50d357cfcf504fdf88bf0051211a6595b4 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 25 Dec 2023 01:22:40 +1000 Subject: [PATCH] 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 ec91e68f92..a70f71eef4 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 697221e119..9287189559 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 c8db702407..1b8641609f 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)