forked from ArthurSonzogni/OpenGL_CMake_Skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (34 loc) · 966 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
# Projects Settings
cmake_minimum_required (VERSION 3.1)
project (opengl-cmake-skeleton)
# The main executable
add_executable(opengl-cmake-skeleton
src/Application.cpp
src/Application.cpp
src/MyApplication.cpp
src/MyApplication.cpp
src/glError.hpp
src/glError.cpp
src/main.cpp
src/Shader.hpp
src/Shader.cpp
)
set_property(TARGET opengl-cmake-skeleton PROPERTY CXX_STANDARD 11)
target_compile_options(opengl-cmake-skeleton PRIVATE -Wall)
add_definitions(-DGLEW_STATIC)
add_subdirectory(lib/glfw EXCLUDE_FROM_ALL)
add_subdirectory(lib/glew EXCLUDE_FROM_ALL)
add_subdirectory(lib/glm EXCLUDE_FROM_ALL)
target_link_libraries(opengl-cmake-skeleton
PRIVATE glfw
PRIVATE libglew_static
PRIVATE glm
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/asset.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/src/asset.hpp
)
target_include_directories(opengl-cmake-skeleton
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src
)