From f7f0f36c3fec7786e15ee79c7aa184c50caa3cd7 Mon Sep 17 00:00:00 2001 From: Bertram Date: Thu, 28 Jan 2010 22:33:54 +0100 Subject: 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. --- CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') 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) + -- cgit