diff options
| author | Indrajith K L | 2025-11-09 16:12:20 +0530 |
|---|---|---|
| committer | Indrajith K L | 2025-11-09 16:12:20 +0530 |
| commit | 8c9367f3689aee05d33fc1cae8a5d1aa6d2b5fb8 (patch) | |
| tree | 94ab60d8a0dd939478f9b2838bdc6c1d693cb9a8 /CMakeLists.txt | |
| parent | 0fbc961bb8e7b9864c0982bb86b0de2e25d6f4aa (diff) | |
| download | reilua-enhanced-8c9367f3689aee05d33fc1cae8a5d1aa6d2b5fb8.tar.gz reilua-enhanced-8c9367f3689aee05d33fc1cae8a5d1aa6d2b5fb8.tar.bz2 reilua-enhanced-8c9367f3689aee05d33fc1cae8a5d1aa6d2b5fb8.zip | |
Add game folder workflow, custom executable names, cross-platform tasks, and logging controls
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b57da..aef831d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,20 @@ include( CMakeDependentOption ) include( EnumOption ) cmake_minimum_required( VERSION 3.9 ) -project( ReiLua ) + +# Try to read custom project name from project.info +set( PROJECT_NAME_VAR "ReiLua" ) +if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/project.info" ) + file( STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/project.info" PROJECT_INFO_LINES ) + foreach( LINE ${PROJECT_INFO_LINES} ) + if( LINE MATCHES "^EXECUTABLE_NAME=(.+)$" ) + set( PROJECT_NAME_VAR "${CMAKE_MATCH_1}" ) + message( STATUS "Using custom executable name: ${PROJECT_NAME_VAR}" ) + endif() + endforeach() +endif() + +project( ${PROJECT_NAME_VAR} ) # Find Python interpreter (python3 or python) find_package(Python3 COMPONENTS Interpreter) @@ -36,6 +49,12 @@ if( NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES ) set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" ) endif() +# Set compiler flags for Release builds +if( CMAKE_BUILD_TYPE STREQUAL "Release" ) + add_definitions( -DNDEBUG ) + message( STATUS "Release build - logging disabled by default" ) +endif() + file( GLOB SOURCES src/*.c ) # Always embed logo files for splash screens |
