-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (23 loc) · 990 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
cmake_minimum_required(VERSION 3.0)
project(opengl)
include(CTest)
enable_testing()
set (source_dir "${PROJECT_SOURCE_DIR}")
file (GLOB source_files "${source_dir}/src/*.cpp" "${source_dir}/src/Intermediate/*.cpp" "${source_dir}/src/scences/*.cpp" "${source_dir}/src/external/imGUI/*.cpp")
##list(REMOVE_ITEM ITEM "src/external/imGUI/main.cpp")
add_executable(${PROJECT_NAME} ${source_files})
install(TARGETS opengl RUNTIME DESTINATION bin)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(libs/glfw-3.3.7)
target_link_libraries(opengl glfw)
find_package(OpenGL REQUIRED)
target_link_libraries(opengl OpenGL::GL)
find_package(GLEW REQUIRED)
target_link_libraries(opengl GLEW::GLEW)
find_package(assimp CONFIG REQUIRED)
target_link_libraries(opengl assimp::assimp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)