-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
54 lines (42 loc) · 1.5 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
# CMake version
cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR)
# Include cmake modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
# Declare project
project(gl_shaded_gltfscene)
# Set output directories
set(DEFAULT_CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
# Set enable output of compile commands during generation
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Includes
include_directories(Includes)
include_directories(Resources)
include_directories(Libraries)
include_directories(Libraries/glad)
include_directories(Libraries/glm)
include_directories(Libraries/imgui)
include_directories(Libraries/tinygltf)
include_directories(Libraries/tinyobjloader)
include_directories(Libraries/glfw/include)
include_directories(Libraries/draco/src)
# Compile options
include(Builds/CMake/CompileOptions.cmake)
# Build type - Release by default
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# Overrides
set(CMAKE_MACOSX_RPATH ON)
# Set resource directory
set(RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Resources/")
# Project modules
add_subdirectory(Libraries/glad)
add_subdirectory(Libraries/glfw)
add_subdirectory(Libraries/imgui)
add_subdirectory(Libraries/tinyobjloader)
add_subdirectory(Libraries/draco)
include_directories(${PROJECT_BINARY_DIR} /draco)
add_subdirectory(Sources)