forked from papagiannakis/glGA-edu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·61 lines (50 loc) · 1.99 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
# Version 3.5 is chosen instead of 3.6 because there is no Linux 3.6 yet.
# Still you can use cmake 3.6 on mac or windows to build the project files.
cmake_minimum_required (VERSION 3.3)
# Maps to a solution file (Tutorial.sln). The solution will
# have all targets (exe, lib, dll) as projects (.vcproj)
PROJECT (glGAframework C CXX)
# Turn on the ability to create folders to organize projects (.vcproj)
# It creates "CMakePredefinedTargets" folder by default and adds CMake
# defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set (CMAKE_CXX_STANDARD 11)
if (WIN32)
# Set compiler flags and options.
# Here it is setting the Visual Studio warning level to 3
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# if OSX !
set (SOURCE_ROOT ${CMAKE_SOURCE_DIR})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else ()
# if Linux !
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif ()
# Command to output information to the console
# Useful for displaying errors, warnings, and debugging
message ("cxx Flags: " ${CMAKE_CXX_FLAGS})
include_directories ( libraries/include
libraries/include/glGA
libraries/include/glGAMath
libraries/include/KDTree
libraries/include/PRT
_thirdPartyLibs/include
_thirdPartyLibs/include/boost
_thirdPartyLibs/include/Bullet
_thirdPartyLibs/include/Assimp
_thirdPartyLibs/include/glew
_thirdPartyLibs/include/glm
_thirdPartyLibs/include/ImGUI
_thirdPartyLibs/include/SDL2
_thirdPartyLibs/include/SOIL2
)
# Sub-directories where more CMakeLists.txt exist
add_subdirectory(libraries)
add_subdirectory(examples)
add_subdirectory (openvr)
# UnComment to re-build ImGui
# Remember to change output lib name from ImGUI.lib to:
# -ImGui_vs15 for Visual Studio 2014-
# -ImGui for Visual Studio 2012-
#add_subdirectory (_thirdPartyLibs)