-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (27 loc) · 843 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (27 loc) · 843 Bytes
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
cmake_minimum_required(VERSION 3.16)
project(OPENGL)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_library(glad libs/glad/src/glad.c)
target_include_directories(glad PUBLIC
libs/glad/include
)
add_executable(app src/main.cpp)
add_executable(shader src/shaders.cpp src/header/shader.h)
#app inlcude libs
target_include_directories(app PRIVATE
libs/glfw/include
)
target_link_directories(app PRIVATE
libs/glfw/lib-mingw-w64
)
target_link_libraries(app
glfw3
opengl32
glad
)
#shaders include libs
target_include_directories(shader PRIVATE target_include_directories(my_app PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")libs/glfw/include)
target_link_directories(shader PRIVATE libs/glfw/lib-mingw-w64)
target_link_libraries(shader glfw3 opengl32 glad)