-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (30 loc) · 1.38 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
cmake_minimum_required(VERSION 3.10)
project(render_3d)
add_executable(render_3d main.cpp
Camera/Camera.cpp
Camera/Camera.h
Mesh/Mesh.cpp
Mesh/Mesh.h
Shader/Shader.cpp
Shader/Shader.h
Renderer/Renderer.cpp
Renderer/Renderer.h)
add_library(glfw STATIC IMPORTED)
set_target_properties(glfw PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/glfw/lib/libglfw3.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/glfw/include"
)
add_library(glew STATIC IMPORTED)
set_target_properties(glew PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/glew/lib/glew32s.lib"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/glew/include"
)
add_library(freeglut STATIC IMPORTED)
set_target_properties(freeglut PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/freeglut/lib/libfreeglut_static.a"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/freeglut/include"
)
find_package(OpenGL REQUIRED)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/glm")
target_compile_definitions(render_3d PRIVATE FREEGLUT_STATIC GLEW_STATIC)
target_link_libraries(render_3d glfw glew freeglut OpenGL::GL winmm -static)