mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-02 09:28:33 -04:00
fix: make updater functionality conditional with CITRON_USE_AUTO_UPDATER option
- Add CITRON_USE_AUTO_UPDATER CMake option (default: OFF) - Move updater source files to conditional target_sources block - Add _WIN32 definition for proper moc processing on Windows - Fixes C2664 compilation error with UpdaterDialog::OnUpdateCompleted Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -210,11 +210,6 @@ add_executable(citron
|
||||
startup_checks.h
|
||||
uisettings.cpp
|
||||
uisettings.h
|
||||
updater/updater_service.cpp
|
||||
updater/updater_service.h
|
||||
updater/updater_dialog.cpp
|
||||
updater/updater_dialog.h
|
||||
updater/updater_dialog.ui
|
||||
util/clickable_label.cpp
|
||||
util/clickable_label.h
|
||||
util/controller_navigation.cpp
|
||||
@@ -252,6 +247,21 @@ if (CITRON_CRASH_DUMPS)
|
||||
target_compile_definitions(citron PRIVATE CITRON_CRASH_DUMPS)
|
||||
endif()
|
||||
|
||||
if (CITRON_USE_AUTO_UPDATER)
|
||||
target_sources(citron PRIVATE
|
||||
updater/updater_service.cpp
|
||||
updater/updater_service.h
|
||||
updater/updater_dialog.cpp
|
||||
updater/updater_dialog.h
|
||||
updater/updater_dialog.ui
|
||||
)
|
||||
|
||||
target_compile_definitions(citron PRIVATE
|
||||
# Ensure _WIN32 is defined for moc processing on Windows
|
||||
$<$<BOOL:${WIN32}>:_WIN32>
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_definitions(citron PRIVATE
|
||||
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,15>:CANNOT_EXPLICITLY_INSTANTIATE>
|
||||
|
||||
Reference in New Issue
Block a user