summaryrefslogtreecommitdiff
path: root/tools/dyecmd/CMakeLists.txt
diff options
context:
space:
mode:
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)