-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (46 loc) · 1.3 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
cmake_minimum_required(VERSION 3.5)
project(OpenGLExamples)
### Debug
#message("CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR})
#message("CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR})
#message("CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH})
#message("CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
### Additional cmake files.
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
message(STATUS "CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH})
### Check if supported platforms and compilers.
if(WIN32)
if(MSVC)
elseif()
message(FATAL_ERROR "You are using an unsupported Windows compiler!")
endif()
elseif(UNIX)
option(FORCE_32BIT_BUILD "Force a 32bit compile on 64bit" OFF)
else()
message(FATAL_ERROR "You are on an unsupported platform!")
endif()
### OpenGL
find_package(OpenGL REQUIRED)
### External
add_subdirectory(external)
### Examples
set(examples
"AdaptiveTerrainTessellation"
"BillboardBeam"
"Bloom"
"Demo1"
"Dithering"
"FBXLoader"
"KawaseBlur"
"LightStreak"
"Quad"
"RadialBlur"
"SRGBChecker"
"Texture2DArray"
"ToneMapping"
"BitonicSort"
)
foreach(example IN LISTS examples)
message(STATUS "example: ${example}")
add_subdirectory(${example})
endforeach()