fix: Unix unity build fixes in a less lazy and more inclusive way.

This commit is contained in:
cheezwiz7899
2026-04-04 22:05:07 +11:00
parent 1803ded5b0
commit 2a35c2decf
3 changed files with 19 additions and 14 deletions
+4 -4
View File
@@ -648,10 +648,10 @@ endif()
# List of all FFmpeg components required
set(FFmpeg_COMPONENTS
avcodec
avfilter
avutil
swscale)
swscale
avcodec
avutil)
if (UNIX AND NOT APPLE AND NOT ANDROID)
find_package(PkgConfig REQUIRED)
@@ -920,4 +920,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CITRON_ENABLE_LTO)
endif()
endif()
endforeach()
endif()
endif()
-10
View File
@@ -630,13 +630,3 @@ if (CITRON_USE_PRECOMPILED_HEADERS)
endif()
create_target_directory_groups(citron)
# [UNITY-FIX] Skip unity build for X11-polluted files.
if(UNIX AND CMAKE_UNITY_BUILD)
set_source_files_properties(
startup_checks.cpp compatdb.cpp setup_wizard.cpp
mod_manager/mod_service.cpp mod_manager/mod_downloader_dialog.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE
)
endif()
+15
View File
@@ -16,6 +16,21 @@
#include <objc/message.h>
#endif
#if defined(__linux__) || defined(__FreeBSD__)
// Fix X11 macro pollution for unity builds
#undef Always
#undef Bool
#undef CurrentTime
#undef False
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef None
#undef Status
#undef Success
#undef True
#endif
namespace QtCommon {
Core::Frontend::WindowSystemType GetWindowSystemType() {
// Determine WSI type based on Qt platform.