summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-01-28 22:33:54 +0100
committerBertram <bertram@cegetel.net>2010-01-28 22:33:54 +0100
commitf7f0f36c3fec7786e15ee79c7aa184c50caa3cd7 (patch)
tree0832fa62aff4b8760709910c5a156d85edb58224 /CMakeLists.txt
parenta6a20e5bafea3f1252891b4fa2db83a90e25b8e1 (diff)
downloadmanaserv-f7f0f36c3fec7786e15ee79c7aa184c50caa3cd7.tar.gz
manaserv-f7f0f36c3fec7786e15ee79c7aa184c50caa3cd7.tar.xz
manaserv-f7f0f36c3fec7786e15ee79c7aa184c50caa3cd7.zip
Added WIP entries for Cmake build. This is configurable but non-working atm.
I'll need a bit more time and help to get this fully working, but it's a good start :) Also corrected a typo in a makefile.am file.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..d365b8a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,34 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT(MANASERV)
+
+IF (NOT VERSION)
+ SET(VERSION 0.1.0.0)
+ENDIF()
+
+# where to look for cmake modules
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
+
+IF (WIN32)
+ SET(PKG_DATADIR ".")
+ SET(PKG_BINDIR ".")
+ SET(LOCALEDIR ".")
+ STRING(REPLACE "." " " _VERSION ${VERSION})
+ SEPARATE_ARGUMENTS(_VERSION)
+ LIST(LENGTH _VERSION _LEN)
+ IF(NOT _LEN EQUAL 4)
+ 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)
+ LIST(GET _VERSION 3 VER_BUILD)
+ CONFIGURE_FILE(src/winver.h.in src/winver.h)
+ELSE (WIN32)
+ SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/manaserv)
+ SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
+ SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
+ENDIF (WIN32)
+
+ADD_SUBDIRECTORY(src)
+