summaryrefslogtreecommitdiff
path: root/tools/dyecmd/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-02 01:48:38 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-02 02:41:24 +0200
commit3eeae12c498d1a4dbe969462d2ba841f77ee3ccb (patch)
treeff8eab35e732bc0749fc11677c8873a7b3a58704 /tools/dyecmd/CMakeLists.txt
downloadplus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.gz
plus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.bz2
plus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.tar.xz
plus-3eeae12c498d1a4dbe969462d2ba841f77ee3ccb.zip
Initial commit.
This code based on mana client http://www.gitorious.org/mana/mana and my private repository.
Diffstat (limited to 'tools/dyecmd/CMakeLists.txt')
-rw-r--r--tools/dyecmd/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/dyecmd/CMakeLists.txt b/tools/dyecmd/CMakeLists.txt
new file mode 100644
index 000000000..485666485
--- /dev/null
+++ b/tools/dyecmd/CMakeLists.txt
@@ -0,0 +1,28 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT(MANA_DYECOMMAND)
+
+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()
+
+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)
+
+ADD_SUBDIRECTORY(src)