-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
64 lines (57 loc) · 2.09 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# This file is part of the open source part of the
# Platform for Algorithm Development and Rendering (PADrend).
# Web page: http://www.padrend.de/
# Copyright (C) 2009-2013 Benjamin Eikel <[email protected]>
# Copyright (C) 2014-2019 Sascha Brandt <[email protected]>
#
# PADrend consists of an open source part and a proprietary part.
# The open source part of PADrend is subject to the terms of the Mozilla
# Public License, v. 2.0. You should have received a copy of the MPL along
# with this library; see the file LICENSE. If not, you can obtain one at
# http://mozilla.org/MPL/2.0/.
#
cmake_minimum_required(VERSION 3.1.0)
project(PADrendComplete VERSION 1.2.0)
option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON)
# Make sure the libraries are in the same directory as the executable.
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
endif()
option(BUILD_SOUND "Build PADrend with sound support (requires OpenAL)" OFF)
option(BUILD_ALL_TESTS "Build all PADrend tests" OFF)
if(BUILD_ALL_TESTS)
include(CTest)
enable_testing()
set(UTIL_BUILD_TESTS ON CACHE BOOL "" FORCE)
set(RENDERING_BUILD_TESTS ON CACHE BOOL "" FORCE)
set(MINSG_BUILD_TESTS ON CACHE BOOL "" FORCE)
set(GEOMETRY_BUILD_TESTS ON CACHE BOOL "" FORCE)
set(BUILD_ESCRIPT_TEST ON CACHE BOOL "" FORCE)
endif()
add_subdirectory(modules/Geometry)
add_subdirectory(modules/Util)
add_subdirectory(modules/Rendering)
add_subdirectory(modules/GUI)
if(BUILD_SOUND)
add_subdirectory(modules/Sound)
endif()
add_subdirectory(modules/MinSG)
add_subdirectory(modules/EScript)
add_subdirectory(modules/E_Geometry)
add_subdirectory(modules/E_Util)
add_subdirectory(modules/E_Rendering)
add_subdirectory(modules/E_GUI)
if(BUILD_SOUND)
add_subdirectory(modules/E_Sound)
endif()
add_subdirectory(modules/E_MinSG)
add_subdirectory(PADrendMain)
add_subdirectory(plugins)
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/extPlugins")
add_subdirectory(extPlugins)
endif()
if(CMAKE_GENERATOR MATCHES "Xcode")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
endif()