-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (44 loc) · 1.4 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
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.2)
project(efgl VERSION 0.0.1 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(VENDOR ${PROJECT_SOURCE_DIR}/vendor)
set(SOURCE_DIR ${PROJECT_SOURCE_DIR}/efgl/src)
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/**/*.cpp)
file(GLOB TOPLEVEL_SOURCES ${SOURCE_DIR}/*.cpp)
set(SOURCES ${SOURCES} ${TOPLEVEL_SOURCES})
add_executable(efgl ${SOURCES})
target_compile_definitions(efgl PRIVATE DEBUG)
set(INCLUDES ${SOURCE_DIR}
${SOURCE_DIR}/application
${SOURCE_DIR}/geometry
${SOURCE_DIR}/geometry/prim
${SOURCE_DIR}/material
${SOURCE_DIR}/platform/OpenGL
${SOURCE_DIR}/platform/OpenGL/fbo
${SOURCE_DIR}/render
${SOURCE_DIR}/scene
${SOURCE_DIR}/texture
${SOURCE_DIR}/util)
set(INCLUDES ${INCLUDES}
${VENDOR}/assimp/include
${VENDOR}/Glad/include
${VENDOR}/GLFW/include
${VENDOR}/glm
${VENDOR}/imgui
${VENDOR}/stb
${VENDOR}/tracy)
target_include_directories(efgl PRIVATE ${INCLUDES})
add_subdirectory(vendor/assimp)
target_link_libraries(efgl PRIVATE assimp)
add_subdirectory(vendor/Glad)
target_link_libraries(efgl PRIVATE glad)
add_subdirectory(vendor/GLFW)
target_link_libraries(efgl PRIVATE glfw)
add_subdirectory(vendor/glm)
target_link_libraries(efgl PRIVATE glm)
add_subdirectory(vendor/imgui)
target_link_libraries(efgl PRIVATE imgui)
target_precompile_headers(efgl
PRIVATE ${SOURCE_DIR}/efpch.h)
message(${SOURCES})