summaryrefslogtreecommitdiff
path: root/tools/dyecmd/CMakeLists.txt
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-18 11:16:47 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-20 17:52:51 +0200
commitc74052c766df01eafc3cb5f98c46d779bee8b0e9 (patch)
treefb20474973c2e7941a13964b898b7724aa141fed /tools/dyecmd/CMakeLists.txt
parent5e400c91b7ac292dd8a555c9c2f18075fd778d78 (diff)
downloadmana-c74052c766df01eafc3cb5f98c46d779bee8b0e9.tar.gz
mana-c74052c766df01eafc3cb5f98c46d779bee8b0e9.tar.bz2
mana-c74052c766df01eafc3cb5f98c46d779bee8b0e9.tar.xz
mana-c74052c766df01eafc3cb5f98c46d779bee8b0e9.zip
CMake: Use cmake-format to make the files more pleasant to read
More consistent formatting and no longer everything in uppercase, yay!
Diffstat (limited to 'tools/dyecmd/CMakeLists.txt')
-rw-r--r--tools/dyecmd/CMakeLists.txt43
1 files changed, 22 insertions, 21 deletions
diff --git a/tools/dyecmd/CMakeLists.txt b/tools/dyecmd/CMakeLists.txt
index 48566648..309420d2 100644
--- a/tools/dyecmd/CMakeLists.txt
+++ b/tools/dyecmd/CMakeLists.txt
@@ -1,28 +1,29 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
-PROJECT(MANA_DYECOMMAND)
+project(MANA_DYECOMMAND)
-IF (NOT VERSION)
- SET(VERSION 1.0.0)
-ENDIF()
+if(NOT VERSION)
+ set(VERSION 1.0.0)
+endif()
-STRING(REPLACE "." " " _VERSION ${VERSION})
-SEPARATE_ARGUMENTS(_VERSION)
-LIST(LENGTH _VERSION _LEN)
-IF(NOT (_LEN EQUAL 4 OR _LEN EQUAL 3))
- MESSAGE(FATAL_ERROR "Version needs to be in the form MAJOR.MINOR.RELEASE[.BUILD]")
-ENDIF()
+string(REPLACE "." " " _VERSION ${VERSION})
+separate_arguments(_VERSION)
+list(LENGTH _VERSION _LEN)
+if(NOT (_LEN EQUAL 4 OR _LEN EQUAL 3))
+ message(
+ FATAL_ERROR "Version needs to be in the form MAJOR.MINOR.RELEASE[.BUILD]")
+endif()
-LIST(GET _VERSION 0 VER_MAJOR)
-LIST(GET _VERSION 1 VER_MINOR)
-LIST(GET _VERSION 2 VER_RELEASE)
-IF(_LEN EQUAL 4)
- LIST(GET _VERSION 3 VER_BUILD)
-ELSE()
- SET(VER_BUILD 0)
-ENDIF()
+list(GET _VERSION 0 VER_MAJOR)
+list(GET _VERSION 1 VER_MINOR)
+list(GET _VERSION 2 VER_RELEASE)
+if(_LEN EQUAL 4)
+ list(GET _VERSION 3 VER_BUILD)
+else()
+ set(VER_BUILD 0)
+endif()
# where to look for cmake modules
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
-ADD_SUBDIRECTORY(src)
+add_subdirectory(src)