Skip to content

Commit 164cf65

Browse files
committed
CMake Options
- Make our CMake variables use options
1 parent 7778b69 commit 164cf65

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set(CMAKE_CXX_STANDARD 20)
44
set(CMAKE_CXX_STANDARD_REQUIRED ON)
55
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66

7+
option(ENABLE_DEBUG "Build with debug features" OFF)
8+
option(ENABLE_TIMING "Build with timing features" OFF)
9+
option(DRY_RUN "Skip patching game files" OFF)
10+
option(LOGIC_TESTS "Logic tests will be run" OFF)
11+
option(QT_GUI "Build with Qt GUI" OFF)
12+
option(EMBED_DATA "Embed data in Qt app" OFF)
13+
714
# Versioning
815
if(DEFINED RELEASE_TAG)
916
# Use the new tag we're creating for this release (passed in workflow)
@@ -71,7 +78,6 @@ if(LOGIC_TESTS)
7178
endif()
7279
endif()
7380

74-
7581
# Path strings for logging
7682
string(LENGTH "${CMAKE_SOURCE_DIR}/" SOURCE_PATH_SIZE)
7783
add_compile_definitions(SOURCE_PATH_SIZE=${SOURCE_PATH_SIZE})
@@ -83,7 +89,7 @@ file(COPY "assets" DESTINATION "${CMAKE_BINARY_DIR}/data")
8389
file(COPY "logic/data/" DESTINATION "${CMAKE_BINARY_DIR}/data/logic" REGEX "^.*example.*$" EXCLUDE) # World, macros, and location info
8490
file(COPY "customizer/data/" DESTINATION "${CMAKE_BINARY_DIR}/data/customizer") # Default model info
8591

86-
if(DEFINED QT_GUI)
92+
if(QT_GUI)
8793
message("Building with Qt GUI")
8894

8995
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)

0 commit comments

Comments
 (0)