1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Add: [CMake] Allow renaming of openttd binary

This commit is contained in:
glx22
2020-06-11 21:57:14 +02:00
committed by glx22
parent 53de5b5c55
commit 97592c4093
3 changed files with 11 additions and 6 deletions

View File

@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.5)
project(OpenTTD)
if (NOT BINARY_NAME)
set(BINARY_NAME openttd)
endif (NOT BINARY_NAME)
project(${BINARY_NAME})
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-source builds not allowed. Please run \"cmake ..\" from the bin directory")
@@ -131,6 +135,7 @@ include(CompileFlags)
compile_flags()
add_executable(openttd WIN32 ${GENERATED_SOURCE_FILES})
set_target_properties(openttd PROPERTIES OUTPUT_NAME "${BINARY_NAME}")
# All other files are added via target_sources()
include(AddCustomXXXTimestamp)