-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (34 loc) · 971 Bytes
/
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.30)
project(OpenGL_Learn)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(GLFW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Dependence/glfw-3.4.bin.WIN64)
set(GLFW_INCLUDE_DIR ${GLFW_DIR}/include)
set(GLFW_LIBRARY_DIR ${GLFW_DIR}/lib-mingw-w64)
set(ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/assets)
# COPY ASSETS
file(COPY ${ASSETS_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
message(STATUS "----------------- GLFW -----------------")
message(STATUS "GLFW_DIR: ${GLFW_DIR}")
message(STATUS "GLFW_INCLUDE_DIR: ${GLFW_INCLUDE_DIR}")
message(STATUS "GLFW_LIBRARY_DIR: ${GLFW_LIBRARY_DIR}")
message(STATUS "----------------- GLFW -----------------")
include_directories(
"include"
${GLFW_INCLUDE_DIR}
)
link_directories(
${GLFW_LIBRARY_DIR}
)
add_executable(
OpenGL_Learn
src/main.cpp
src/shader.cpp
src/camera.cpp
src/glad.c
)
target_link_libraries(
OpenGL_Learn
glfw3
opengl32
)