diff options
author | glx22 <glx@openttd.org> | 2020-06-11 21:57:14 +0200 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2020-07-02 21:18:14 +0200 |
commit | 97592c409378c2d353a1cdd6b50f80b7e81b67c2 (patch) | |
tree | 73adb848809067153a3eaae989f8f79c1dcc349d /CMakeLists.txt | |
parent | 53de5b5c55f22c3f37db44c4e5ca2c609cbf7b27 (diff) | |
download | openttd-97592c409378c2d353a1cdd6b50f80b7e81b67c2.tar.xz |
Add: [CMake] Allow renaming of openttd binary
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 06cd71c3a..364236c86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |