-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (34 loc) · 1.03 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
# Copyright 2024 Betamark Pty Ltd. All rights reserved.
# Author: Shlomi Nissan ([email protected])
cmake_minimum_required(VERSION 3.22.1)
project(opengl-cmake)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
message(${CMAKE_SOURCE_DIR}/cmake)
include(cmake/ShaderString.cmake)
ShaderString()
find_package(OpenGL REQUIRED)
find_package(fmt REQUIRED)
find_package(glad REQUIRED)
find_package(glfw3 REQUIRED)
find_package(glm REQUIRED)
set(CORE_SOURCES
src/core/mesh.cpp
src/core/mesh.h
src/core/shader.cpp
src/core/shader.h
src/core/timer.h
src/core/window.cpp
src/core/window.h
)
set(DEMO_SOURCES
src/main.cpp
)
add_executable(opengl-cmake ${LIBS_SOURCES} ${CORE_SOURCES} ${DEMO_SOURCES})
target_include_directories(opengl-cmake PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/libs
)
target_link_libraries(opengl-cmake PRIVATE fmt::fmt glfw glad::glad glm::glm OpenGL::GL)