-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
141 lines (123 loc) · 4.45 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
cmake_minimum_required(VERSION 3.6)
project(blue)
# Used for Android APK deployment.
set(BLUE_ROOT_PATH ${CMAKE_CURRENT_LIST_DIR})
include(cmake/CurrentPlatform.cmake)
include(cmake/Dependencies.cmake)
include(cmake/Tests.cmake)
blue_detect_platform()
blue_find_dependencies()
option(BLUE_ADD_TESTS "Run tests after build." ON)
message(STATUS "[BLUE] Build type: ${CMAKE_BUILD_TYPE}")
if (BLUE_ADD_TESTS)
blue_add_tests()
endif ()
option(BLUE_EXAMPLES "Additionally build code samples as an artifact." ON)
if (BLUE_EXAMPLES)
add_subdirectory(examples)
endif ()
add_subdirectory(vendor)
add_library(
blue STATIC
src/blue/TextureUtils.cpp
src/blue/FontUtils.cpp
include/blue/FontUtils.hpp
src/blue/Window.cpp
src/blue/Logger.cpp
src/blue/Renderer.cpp
src/blue/Context.cpp
src/blue/ResourcesPath.cpp
src/blue/InputHandler.cpp
src/blue/Timestep.cpp
src/blue/gpu/handlers/CompileShaderHandler.cpp
src/blue/gpu/handlers/AddFramebufferTextureAttachmentHandler.cpp
src/blue/gpu/handlers/CreateFramebufferHandler.cpp
src/blue/gpu/handlers/CreateTextureHandler.cpp
src/blue/gpu/handlers/DisposeTextureHandler.cpp
src/blue/gpu/handlers/DisposeShaderHandler.cpp
src/blue/gpu/handlers/ReadFramebufferHandler.cpp
src/blue/gpu/handlers/CreateMeshHandler.cpp
src/blue/gpu/handlers/CreateInstancedMeshHandler.cpp
src/blue/gpu/handlers/DisposeMeshHandler.cpp
src/blue/gpu/handlers/CreateEnvironmentHandler.cpp
src/blue/gpu/handlers/UpdateUniformVariableHandler.cpp
src/blue/gpu/GpuCommandSystem.cpp
src/blue/ShaderUtils.cpp
src/blue/camera/OrthographicCamera.cpp
src/blue/camera/PerspectiveCamera.cpp
src/blue/camera/Camera.cpp
src/blue/gpu/handlers/UpdateEnvironmentHandler.cpp
src/blue/ModelLoader.cpp
src/blue/gpu/handlers/SetClearColorHandler.cpp
src/blue/GpuThread.cpp
include/blue/TextureUtils.hpp
include/blue/GpuThread.hpp
include/blue/gpu/handlers/UpdateUniformVariableHandler.hpp
include/blue/gpu/handlers/SetClearColorHandler.hpp
include/blue/gpu/handlers/CreateFramebufferHandler.hpp
include/blue/ModelLoader.h
include/blue/gpu/handlers/UpdateEnvironmentHandler.hpp
include/blue/ShaderUtils.h
include/blue/gpu/GpuEntities.hpp
# TODO: Remove "Handler" postfix; they're already in "handlers" directory.
include/blue/gpu/handlers/CompileShaderHandler.hpp
include/blue/gpu/handlers/CreateTextureHandler.hpp
include/blue/gpu/handlers/DisposeTextureHandler.hpp
include/blue/gpu/handlers/ReadFramebufferHandler.hpp
include/blue/gpu/handlers/DisposeShaderHandler.hpp
include/blue/gpu/handlers/AddFramebufferTextureAttachmentHandler.hpp
include/blue/gpu/handlers/CreateMeshHandler.hpp
include/blue/gpu/handlers/CreateInstancedMeshHandler.hpp
include/blue/gpu/handlers/DisposeMeshHandler.hpp
include/blue/gpu/handlers/CreateEnvironmentHandler.hpp
include/blue/gpu/GpuCommandSystem.hpp
include/blue/Assertions.h
include/blue/GlDebugging.h
include/blue/Timestep.hpp
include/blue/Renderer.h
include/blue/Context.hpp
include/blue/Logger.hpp
include/blue/ResourcesPath.h
include/blue/InputHandler.h
include/blue/Window.hpp
include/blue/gui/PlacingRules.h
include/blue/gui/Button.hpp
src/blue/gui/Button.cpp
include/blue/camera/PerspectiveCamera.hpp
include/blue/camera/OrthographicCamera.hpp
include/blue/camera/Camera.hpp
src/blue/gpu/handlers/AddFramebufferTextureAttachmentHandler.cpp include/blue/gui/PlacingRules.h)
set_target_properties(blue
PROPERTIES
CXX_STANDARD
14
)
target_include_directories(
blue
PUBLIC
include
${OPENGL_INCLUDE_DIRS}
)
target_link_libraries(
blue
INTERFACE
Dependencies
PRIVATE
Dependencies
)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-export
LIBRARY DESTINATION shlib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
)
install(
DIRECTORY include/
DESTINATION include
FILES_MATCHING PATTERN "*.hpp*"
)
export(PACKAGE blue)
if(BLUE_PLATFORM_ANDROID)
blue_android_postbuild()
endif()