-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (34 loc) · 829 Bytes
/
CMakeLists.txt
File metadata and controls
43 lines (34 loc) · 829 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
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.10)
project(OpenGL-3D-Engine)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Include 'include' directory for headers
include_directories(include)
# Find OpenGL
find_package(OpenGL REQUIRED)
# Find GLEW
find_package(GLEW REQUIRED)
# Find GLFW
find_package(glfw3 REQUIRED)
# Add your source files
file(GLOB_RECURSE SOURCES
"src/*.cpp"
"LS3D/*.cpp"
)
# Create executable
add_executable(${PROJECT_NAME} ${SOURCES})
# Include directories
target_include_directories(${PROJECT_NAME} PRIVATE
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${GLFW_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/lib
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/LS3D
)
# Link libraries
target_link_libraries(${PROJECT_NAME} PRIVATE
${OPENGL_LIBRARIES}
GLEW::GLEW
glfw
)