Initial commit, includes Lua with broken Luabind as a backup for branching purposes
[terrastrategy.git] / projects / lib-math / CMakeLists.txt
blob6076936f640b34377aeb0eda3c10a3ed8d476adf
1 project(lib-math)
3 cmake_minimum_required(VERSION 2.6)
5 set(CMAKE_VERBOSE_MAKEFILE ON)
7 set(HEADER_DIR ../../include/math)
8 set(SRC_DIR ../../src/math)
10 set(LIB_SOURCES
11   ${HEADER_DIR}/math.h
12   ${HEADER_DIR}/vector.h
13   ${HEADER_DIR}/matrix.h
14   ${HEADER_DIR}/quaternion.h
15   ${HEADER_DIR}/transform.h
16   ${HEADER_DIR}/volumes.h
18   ${SRC_DIR}/volumes.cpp
21 include_directories(../../include)
23 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../../lib)
24 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../../lib)
25 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../../)
27 # build commands
28 add_library(math STATIC ${LIB_SOURCES})
30 if(UNIX OR MINGW)
31   set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG")
33   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
34     set_target_properties(math PROPERTIES COMPILE_FLAGS
35       "-fPIC -ansi -pedantic -Wall -Wno-long-long")
36   else( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
37     set_target_properties(math PROPERTIES COMPILE_FLAGS
38       "-ansi -pedantic -Wall -Wno-long-long")
39   endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
40 endif(UNIX OR MINGW)