4 # we require cmake 2.6.3 or higher
5 cmake_minimum_required(VERSION 2.6.3)
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")
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
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)
55 configure_file(s3drc.cmake "${s3d_BINARY_DIR}/s3drc")
56 install(PROGRAMS "${s3d_BINARY_DIR}/s3drc" DESTINATION "${CFG_INSTALL_DIR}")