-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
86 lines (67 loc) · 2.79 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
cmake_minimum_required(VERSION 3.10)
project(learnopengl)
set(CMAKE_CXX_STANDARD 17)
# Libraries
find_package(PkgConfig REQUIRED)
find_package(glm REQUIRED)
find_package(assimp REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
add_library(glad STATIC lib/glad/glad.c)
include_directories(include)
include_directories(${GLFW_INCLUDE_DIRS})
set(LIBRARIES ${GLFW_LIBRARIES} glad glm assimp dl)
set(HEADERS src/Shader.hpp src/Mesh.hpp src/Model.hpp)
# Hello Rectangle
add_executable(HelloRectangle src/HelloRectangle.cpp ${HEADERS})
target_link_libraries(HelloRectangle ${LIBRARIES})
# Hello Rectangle (2 colors)
add_executable(HelloRectangle2 src/HelloRectangle2.cpp ${HEADERS})
target_link_libraries(HelloRectangle2 ${LIBRARIES})
# Shader Uniforms
add_executable(ShaderUniforms src/ShaderUniforms.cpp ${HEADERS})
target_link_libraries(ShaderUniforms ${LIBRARIES})
# Shader VAOs
add_executable(ShadersVAO src/ShadersVAO.cpp ${HEADERS})
target_link_libraries(ShadersVAO ${LIBRARIES})
# Textures
add_executable(Textures src/Textures.cpp ${HEADERS})
target_link_libraries(Textures ${LIBRARIES})
# Transforms
add_executable(Transforms src/Transforms.cpp ${HEADERS})
target_link_libraries(Transforms ${LIBRARIES})
# Coordinate Systems
add_executable(CoordinateSystems src/CoordinateSystems.cpp ${HEADERS})
target_link_libraries(CoordinateSystems ${LIBRARIES})
# Camera
add_executable(Camera src/Camera.cpp ${HEADERS})
target_link_libraries(Camera ${LIBRARIES})
# Lights (Colors)
add_executable(LightColors src/LightColors.cpp ${HEADERS})
target_link_libraries(LightColors ${LIBRARIES})
# Basic Lighting
add_executable(BasicLighting src/BasicLighting.cpp ${HEADERS})
target_link_libraries(BasicLighting ${LIBRARIES})
# Basic Lighting (Gouraud shading)
add_executable(BasicLightingGouraud src/BasicLightingGouraud.cpp ${HEADERS})
target_link_libraries(BasicLightingGouraud ${LIBRARIES})
# Materials
add_executable(Materials src/Materials.cpp ${HEADERS})
target_link_libraries(Materials ${LIBRARIES})
# Lighting Maps
add_executable(LightingMaps src/LightingMaps.cpp ${HEADERS})
target_link_libraries(LightingMaps ${LIBRARIES})
# Light Casters (Directional)
add_executable(LightCastersDirectional src/LightCastersDirectional.cpp ${HEADERS})
target_link_libraries(LightCastersDirectional ${LIBRARIES})
# Light Casters (Point)
add_executable(LightCastersPoint src/LightCastersPoint.cpp ${HEADERS})
target_link_libraries(LightCastersPoint ${LIBRARIES})
# Light Casters Spot
add_executable(LightCastersSpot src/LightCastersSpot.cpp ${HEADERS})
target_link_libraries(LightCastersSpot ${LIBRARIES})
# Multiple Lights
add_executable(MultipleLights src/MultipleLights.cpp ${HEADERS})
target_link_libraries(MultipleLights ${LIBRARIES})
# Model Loading
add_executable(ModelLoading src/ModelLoading.cpp ${HEADERS})
target_link_libraries(ModelLoading ${LIBRARIES})