-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCMakeLists.txt
63 lines (48 loc) · 1.92 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
58
59
60
61
62
63
# ---------------------------------------------------------------------------------
# Projects Settings
# ---------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.3)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
MACRO(SUBDIRLIST result curdir)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
SET(dirlist "")
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child})
LIST(APPEND dirlist ${child})
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
ENDMACRO()
set(EXTERNAL_LIBRARIES_SOURCE_PATH ${CMAKE_SOURCE_DIR}/common/third-party)
# ---------------------------------------------------------------------------------
# Cmake projects
# ---------------------------------------------------------------------------------
project(ITU-graphics-programming)
set(FBX_SUPPORT OFF)
# static libraries
add_subdirectory(${EXTERNAL_LIBRARIES_SOURCE_PATH}/glfw)
add_subdirectory(${EXTERNAL_LIBRARIES_SOURCE_PATH}/glad)
add_subdirectory(${EXTERNAL_LIBRARIES_SOURCE_PATH}/imgui)
add_subdirectory(${EXTERNAL_LIBRARIES_SOURCE_PATH}/assimp)
include_directories(
include
${EXTERNAL_LIBRARIES_SOURCE_PATH}/glad/include
${EXTERNAL_LIBRARIES_SOURCE_PATH}/glfw//include
${EXTERNAL_LIBRARIES_SOURCE_PATH}/imgui/include
${EXTERNAL_LIBRARIES_SOURCE_PATH}/glm
${EXTERNAL_LIBRARIES_SOURCE_PATH}/STBImage
${EXTERNAL_LIBRARIES_SOURCE_PATH}/assimp/include
${EXTERNAL_LIBRARIES_SOURCE_PATH}/assimp
)
## add the actual projects to build
IF(EXISTS ${CMAKE_SOURCE_DIR}/exercises)
add_subdirectory(${CMAKE_SOURCE_DIR}/exercises)
ENDIF()
IF(EXISTS ${CMAKE_SOURCE_DIR}/student_projects)
add_subdirectory(${CMAKE_SOURCE_DIR}/student_projects)
ENDIF()
IF(EXISTS ${CMAKE_SOURCE_DIR}/assignments)
add_subdirectory(${CMAKE_SOURCE_DIR}/assignments)
ENDIF()