-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (39 loc) · 1.87 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
cmake_minimum_required(VERSION 3.12)
# minimum required version of CMake
project(OpenGL_Framework)
# project name
cmake_policy(SET CMP0072 NEW)
# Related to finding packages, forcing new behaviour applied after version 3.12, CMake specific
find_package(OpenGL REQUIRED)
find_package(glm REQUIRED)
find_package(assimp REQUIRED)
# package must be found for this project to work
add_executable(OpenGL-Framework Source/main.cpp
Source/Mesh.cpp Header/Mesh.h
Source/Shader.cpp Header/Shader.h
Source/Scene.cpp Header/Scene.h
Source/Scene/Skybox.cpp Header/Scene/Skybox.h
Source/Camera.cpp Header/Camera.h
Source/Texture.cpp Header/Texture.h
Source/Utility.cpp Header/Utility.h
Source/Material.cpp Header/Material.h
Source/Model.cpp Header/Model.h
Source/Lights/Light.cpp Header/Lights/Light.h
Source/Lights/DirectionalLight.cpp Header/Lights/DirectionalLight.h
Source/Lights/PointLight.cpp Header/Lights/PointLight.h
Source/Lights/SpotLight.cpp Header/Lights/SpotLight.h
Source/Shadows/ShadowMap.cpp Header/Shadows/ShadowMap.h
Source/Shadows/OmniShadowMap.cpp Header/Shadows/OmniShadowMap.h)
# compile the source file, main
include_directories(
$(PROJECT_SOURCE_DIR)/Header
$(PROJECT_SOURCE_DIR)/Header/Lights
$(PROJECT_SOURCE_DIR)/Resources
)
target_link_libraries(OpenGL-Framework
GLEW
glfw
OpenGL::GL
assimp
)
# Link glfw library and OpenGL::GL library. glfw is linked explicitly, while OpenGL::GL is using imported target provided by find_package(OpenGL)