summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/blitter/CMakeLists.txt4
-rw-r--r--src/lang/CMakeLists.txt2
-rw-r--r--src/music/CMakeLists.txt4
-rw-r--r--src/script/api/CMakeLists.txt16
-rw-r--r--src/sound/CMakeLists.txt4
-rw-r--r--src/video/CMakeLists.txt4
7 files changed, 19 insertions, 19 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0ccf650ab..0a0ac406a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,11 +24,11 @@ add_files(
viewport_sprite_sorter_sse4.cpp
CONDITION SSE_FOUND
)
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set_compile_flags(
viewport_sprite_sorter_sse4.cpp
COMPILE_FLAGS -msse4.1)
-endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+endif()
add_files(
aircraft.h
diff --git a/src/blitter/CMakeLists.txt b/src/blitter/CMakeLists.txt
index 2abe6aec0..0aff38141 100644
--- a/src/blitter/CMakeLists.txt
+++ b/src/blitter/CMakeLists.txt
@@ -32,7 +32,7 @@ add_files(
CONDITION NOT OPTION_DEDICATED AND SSE_FOUND
)
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set_compile_flags(
32bpp_anim_sse2.cpp
32bpp_sse2.cpp
@@ -44,7 +44,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clan
32bpp_anim_sse4.cpp
32bpp_sse4.cpp
COMPILE_FLAGS -msse4.1)
-endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+endif()
add_files(
base.hpp
diff --git a/src/lang/CMakeLists.txt b/src/lang/CMakeLists.txt
index 00b554126..d9243b531 100644
--- a/src/lang/CMakeLists.txt
+++ b/src/lang/CMakeLists.txt
@@ -78,7 +78,7 @@ foreach(LANG_SOURCE_FILE IN LISTS LANG_SOURCE_FILES)
)
list(APPEND LANG_BINARY_FILES ${LANG_BINARY_FILE})
-endforeach(LANG_SOURCE_FILE)
+endforeach()
# Create a new target which compiles all language files
add_custom_target(language_files
diff --git a/src/music/CMakeLists.txt b/src/music/CMakeLists.txt
index 0ae15fde2..b20f8aaf7 100644
--- a/src/music/CMakeLists.txt
+++ b/src/music/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (NOT OPTION_DEDICATED)
+if(NOT OPTION_DEDICATED)
add_files(
allegro_m.cpp
allegro_m.h
@@ -42,7 +42,7 @@ if (NOT OPTION_DEDICATED)
os2_m.h
CONDITION OPTION_OS2
)
-endif (NOT OPTION_DEDICATED)
+endif()
add_files(
midi.h
diff --git a/src/script/api/CMakeLists.txt b/src/script/api/CMakeLists.txt
index c22867928..e294cfd05 100644
--- a/src/script/api/CMakeLists.txt
+++ b/src/script/api/CMakeLists.txt
@@ -8,7 +8,7 @@ foreach(ENUM IN LISTS ENUM_LINES)
string(REGEX REPLACE ".* ([^ @]+)@.*" "\\1" FILE_PATTERN "${ENUM}")
file(GLOB FILENAMES "${FILE_PATTERN}")
list(APPEND DEPENDENCIES ${FILENAMES})
-endforeach(ENUM)
+endforeach()
list(REMOVE_DUPLICATES DEPENDENCIES)
# Add a command to generate script_window.hpp
@@ -40,9 +40,9 @@ foreach(API "ai;AI" "game;GS" "template;Template")
list(GET API 1 APIUC)
foreach(SCRIPT_API_FILE IN LISTS SCRIPT_API_FILES)
- if ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*")
+ if("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*")
continue()
- endif ("${SCRIPT_API_FILE}" MATCHES ".*script_controller.*")
+ endif()
get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME)
string(REPLACE "script_" "${APILC}_" SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE_NAME}")
set(SCRIPT_API_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${SCRIPT_API_FILE_NAME}.sq")
@@ -62,7 +62,7 @@ foreach(API "ai;AI" "game;GS" "template;Template")
COMMENT "Generating ${APILC}/${SCRIPT_API_FILE_NAME}.sq"
)
list(APPEND SCRIPT_${APIUC}_BINARY_FILES ${SCRIPT_API_BINARY_FILE})
- endforeach(SCRIPT_API_FILE)
+ endforeach()
add_custom_target_timestamp(script_${APILC}
DEPENDS
@@ -72,7 +72,7 @@ foreach(API "ai;AI" "game;GS" "template;Template")
script_window
)
- if (NOT "${APILC}" STREQUAL "template")
+ if(NOT "${APILC}" STREQUAL "template")
list(APPEND SCRIPT_${APIUC}_BINARY_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${APILC}/${APILC}_controller.hpp.sq")
set(INCLUDES_BINARY_FILE "${CMAKE_BINARY_DIR}/generated/script/api/${APILC}/${APILC}_includes.hpp")
add_custom_command_timestamp(OUTPUT ${INCLUDES_BINARY_FILE}
@@ -100,11 +100,11 @@ foreach(API "ai;AI" "game;GS" "template;Template")
add_dependencies(script_api
script_${APILC}_includes
)
- else (NOT "${APILC}" STREQUAL "template")
+ else()
add_dependencies(script_api
script_${APILC}
)
- endif (NOT "${APILC}" STREQUAL "template")
+ endif()
target_include_directories(script_api
INTERFACE
@@ -112,7 +112,7 @@ foreach(API "ai;AI" "game;GS" "template;Template")
${CMAKE_BINARY_DIR}/generated/script/api/${APILC}
${CMAKE_CURRENT_SOURCE_DIR}/${APILC}
)
-endforeach(API)
+endforeach()
add_library(openttd::script_api ALIAS script_api)
diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt
index 24a38e409..bff33deda 100644
--- a/src/sound/CMakeLists.txt
+++ b/src/sound/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (NOT OPTION_DEDICATED)
+if(NOT OPTION_DEDICATED)
add_files(
allegro_s.cpp
allegro_s.h
@@ -34,7 +34,7 @@ if (NOT OPTION_DEDICATED)
xaudio2_s.h
CONDITION WIN32 AND XAUDIO2_FOUND
)
-endif (NOT OPTION_DEDICATED)
+endif()
add_files(
sound_driver.hpp
diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt
index c6251e939..a5d862e9b 100644
--- a/src/video/CMakeLists.txt
+++ b/src/video/CMakeLists.txt
@@ -1,6 +1,6 @@
add_subdirectory(cocoa)
-if (NOT OPTION_DEDICATED)
+if(NOT OPTION_DEDICATED)
add_files(
allegro_v.cpp
allegro_v.h
@@ -24,7 +24,7 @@ if (NOT OPTION_DEDICATED)
win32_v.h
CONDITION WIN32
)
-endif (NOT OPTION_DEDICATED)
+endif()
add_files(
dedicated_v.cpp