-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
42 lines (31 loc) · 1.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#######################################
# Top-level CMakeLists.txt for spaint #
#######################################
cmake_minimum_required(VERSION 2.8)
PROJECT(straighttoshapes)
#################################
# Add additional compiler flags #
#################################
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-local-typedefs -ansi")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# If on Mac OS X 10.9 (Mavericks), disable the annoying deprecation warnings (e.g. for GLU).
IF(${CMAKE_SYSTEM} MATCHES "Darwin-13.")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
ENDIF()
#########################################
# Specify the default install directory #
#########################################
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install CACHE PATH "" FORCE)
ENDIF()
##########################
# Specify subdirectories #
##########################
ADD_SUBDIRECTORY(modules)
ADD_SUBDIRECTORY(apps)
OPTION(BUILD_TESTS "Build the tests?" OFF)
IF(BUILD_TESTS)
ENABLE_TESTING()
ADD_SUBDIRECTORY(tests)
ENDIF()