mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-22 17:46:08 -04:00
feat: Add build type system and improve fullscreen exit handling
- Add CITRON_BUILD_TYPE CMake variable (Stable/Nightly) - Refactor GenerateSCMRev to use build type instead of repo parsing - Update window title to display build type (Nightly/Stable) - Improve fullscreen exit hotkey using dedicated QAction Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -6,6 +6,15 @@ cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(citron)
|
||||
|
||||
# Define the build type, defaulting to "Nightly" for development and CI builds.
|
||||
set(CITRON_BUILD_TYPE "Stable" CACHE STRING "The build type for the emulator (e.g., Stable, Nightly)")
|
||||
|
||||
# For cmake-gui, this creates a dropdown to select the build type.
|
||||
set_property(CACHE CITRON_BUILD_TYPE PROPERTY STRINGS Stable Nightly)
|
||||
|
||||
# Pass the build type to the C++ source code as a preprocessor definition.
|
||||
add_definitions("-DCITRON_BUILD_TYPE=\"${CITRON_BUILD_TYPE}\"")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
|
||||
|
||||
@@ -558,7 +567,7 @@ endif()
|
||||
|
||||
function(set_citron_qt_components)
|
||||
# Best practice is to ask for all components at once, so they are from the same version
|
||||
set(CITRON_QT_COMPONENTS2 Core Widgets Concurrent)
|
||||
set(CITRON_QT_COMPONENTS2 Core Widgets Concurrent GuiPrivate)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
list(APPEND CITRON_QT_COMPONENTS2 DBus)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user