summaryrefslogtreecommitdiff
path: root/cmake/Options.cmake
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-09-25 12:55:25 +0100
committerCharles Pigott <charlespigott@googlemail.com>2020-09-25 14:43:13 +0100
commit348c231e12d87c106bd1ab3c9d7a5ecdab6863d8 (patch)
tree42f3d9120a1c194068e06cb5918192eeb3175dbe /cmake/Options.cmake
parentdf5362a0083b571d0b8eb2879b618c3edbf9e7fc (diff)
downloadopenttd-348c231e12d87c106bd1ab3c9d7a5ecdab6863d8.tar.xz
Codechange: Make codestyle for CMake files consistent for 'control' statements
Diffstat (limited to 'cmake/Options.cmake')
-rw-r--r--cmake/Options.cmake42
1 files changed, 21 insertions, 21 deletions
diff --git a/cmake/Options.cmake b/cmake/Options.cmake
index 4f2404b2d..0167ad0a6 100644
--- a/cmake/Options.cmake
+++ b/cmake/Options.cmake
@@ -5,36 +5,36 @@ include(GNUInstallDirs)
# set_directory_options()
#
function(set_directory_options)
- if (APPLE)
+ if(APPLE)
set(DEFAULT_PERSONAL_DIR "Documents/OpenTTD")
set(DEFAULT_SHARED_DIR "/Library/Application Support/OpenTTD")
set(DEFAULT_GLOBAL_DIR "(not set)")
- elseif (WIN32)
+ elseif(WIN32)
set(DEFAULT_PERSONAL_DIR "OpenTTD")
set(DEFAULT_SHARED_DIR "(not set)")
set(DEFAULT_GLOBAL_DIR "(not set)")
- elseif (UNIX)
+ elseif(UNIX)
set(DEFAULT_PERSONAL_DIR ".${BINARY_NAME}")
set(DEFAULT_SHARED_DIR "(not set)")
set(DEFAULT_GLOBAL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${BINARY_NAME}")
- else ()
+ else()
message(FATAL_ERROR "Unknown OS found; please consider creating a Pull Request to add support for this OS.")
- endif ()
+ endif()
- if (NOT PERSONAL_DIR)
+ if(NOT PERSONAL_DIR)
set(PERSONAL_DIR "${DEFAULT_PERSONAL_DIR}" CACHE STRING "Personal directory")
message(STATUS "Detecting Personal Data directory - ${PERSONAL_DIR}")
- endif (NOT PERSONAL_DIR)
+ endif()
- if (NOT SHARED_DIR)
+ if(NOT SHARED_DIR)
set(SHARED_DIR "${DEFAULT_SHARED_DIR}" CACHE STRING "Shared directory")
message(STATUS "Detecting Shared Data directory - ${SHARED_DIR}")
- endif (NOT SHARED_DIR)
+ endif()
- if (NOT GLOBAL_DIR)
+ if(NOT GLOBAL_DIR)
set(GLOBAL_DIR "${DEFAULT_GLOBAL_DIR}" CACHE STRING "Global directory")
message(STATUS "Detecting Global Data directory - ${GLOBAL_DIR}")
- endif (NOT GLOBAL_DIR)
+ endif()
endfunction()
# Set some generic options that influence what is being build.
@@ -42,11 +42,11 @@ endfunction()
# set_options()
#
function(set_options)
- if (UNIX AND NOT APPLE)
+ if(UNIX AND NOT APPLE)
set(DEFAULT_OPTION_INSTALL_FHS ON)
- else (UNIX AND NOT APPLE)
+ else()
set(DEFAULT_OPTION_INSTALL_FHS OFF)
- endif (UNIX AND NOT APPLE)
+ endif()
option(OPTION_FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
@@ -74,17 +74,17 @@ endfunction()
# add_definitions_based_on_options()
#
function(add_definitions_based_on_options)
- if (OPTION_DEDICATED)
+ if(OPTION_DEDICATED)
add_definitions(-DDEDICATED)
- endif (OPTION_DEDICATED)
+ endif()
- if (NOT OPTION_USE_THREADS)
+ if(NOT OPTION_USE_THREADS)
add_definitions(-DNO_THREADS)
- endif (NOT OPTION_USE_THREADS)
+ endif()
- if (OPTION_USE_ASSERTS)
+ if(OPTION_USE_ASSERTS)
add_definitions(-DWITH_ASSERT)
- else (OPTION_USE_ASSERTS)
+ else()
add_definitions(-DNDEBUG)
- endif (OPTION_USE_ASSERTS)
+ endif()
endfunction()