Release s3d 0.2.2
[s3d.git] / CMakeLists.txt
blob80618e2fbb9e29675a2b7380d456285c2b0fa9a6
1 project(s3d C)
2 set(VERSION 0.2.2)
4 # we require cmake 2.6.3 or higher
5 cmake_minimum_required(VERSION 2.6.3)
7 # set cmake policies
8 if(COMMAND cmake_policy)
9         cmake_policy(SET CMP0003 NEW)
10 endif(COMMAND cmake_policy)
12 # Add directory with library checks to search path
13 list(APPEND CMAKE_MODULE_PATH "${s3d_SOURCE_DIR}/cmake/modules")
15 include(S3DInternals)
17 # set path to objects
18 set(OBJECTPATH "${S3D_DATA_INSTALL_DIR}")
19 STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
20 if (NOT BUILD_TYPE MATCHES "REL(WITHDEBINFO|EASE)")
21         set(OBJECTPATH "${OBJECTPATH}:${s3d_SOURCE_DIR}/objs")
22 endif (NOT BUILD_TYPE MATCHES "REL(WITHDEBINFO|EASE)")
24 # set debug level with -DDEBUG=level
25 include(SetDebugLevel)
27 # Enable profiling support with -DPROFILING
28 include(EnableProfiling)
30 # Set some compiler flags
31 include(SetCCWarnFlags)
33 # Enable C9X if possible
34 # disabled because s3d uses c9x features but doesnt compile with it
35 #include(SetC9X)
37 # Run configure stuff
38 include(ConfigureChecks.cmake)
40 add_subdirectory(libs3d)
41 add_subdirectory(libs3dw)
42 add_subdirectory(apps)
43 add_subdirectory(cmake)
44 add_subdirectory(Documentation)
45 add_subdirectory(example)
46 add_subdirectory(objs)
47 add_subdirectory(server)
49 file(GLOB INCLUDE_EXPERIMENTAL experimental)
50 if (INCLUDE_EXPERIMENTAL)
51         add_subdirectory(experimental)
52 endif (INCLUDE_EXPERIMENTAL)
54 # Generate s3drc
55 configure_file(s3drc.cmake "${s3d_BINARY_DIR}/s3drc")
56 install(PROGRAMS "${s3d_BINARY_DIR}/s3drc" DESTINATION "${CFG_INSTALL_DIR}")