-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
424 lines (404 loc) · 18.8 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
cmake_minimum_required(VERSION 3.11.0 FATAL_ERROR)
project( LIBPUMEX LANGUAGES CXX C VERSION 0.2.0 )
set( LIBPUMEX_SOVERSION 1 )
message( STATUS "Configuring PUMEX library version ${LIBPUMEX_VERSION_MAJOR}.${LIBPUMEX_VERSION_MINOR}.${LIBPUMEX_VERSIONPUMEX_VERSION_PATCH}" )
# We have to enable assembly language at this stage so that TBB will be able to compile its assembly files from within LIBPUMEX solution
if(WIN32 AND MSVC)
enable_language(ASM)
endif()
if ( UNIX AND NOT APPLE AND NOT ANDROID AND NOT WEBGL )
set( LINUX TRUE )
else()
set( LINUX FALSE )
endif()
if (POLICY CMP0076)
cmake_policy(SET CMP0076 OLD)
endif()
option( PUMEX_BUILD_EXAMPLES "Build examples" ON )
option( PUMEX_BUILD_QT "Build Pumex with QT support" OFF )
option( PUMEX_BUILD_TEXTURE_LOADERS "Build Pumex with PNG, JPEG, etc support" ON )
if(WIN32)
option( PUMEX_DOWNLOAD_EXTERNAL_GLM "Download GLM library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_GLI "Download GLI library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ARGS "Download ARGS library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ASSIMP "Download Assimp library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_FREETYPE "Download Freetype2 library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_TBB "Download TBB library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ZLIB "Download ZLIB library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_PNG "Download PNG library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_JPEG "Download JPEG library" ON )
elseif(ANDROID)
option( PUMEX_DOWNLOAD_EXTERNAL_GLM "Download GLM library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_GLI "Download GLI library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ARGS "Download ARGS library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ASSIMP "Download Assimp library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_FREETYPE "Download Freetype2 library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_TBB "Download TBB library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ZLIB "Download ZLIB library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_PNG "Download PNG library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_JPEG "Download JPEG library" ON )
elseif(LINUX)
option( PUMEX_DOWNLOAD_EXTERNAL_GLM "Download GLM library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_GLI "Download GLI library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ARGS "Download ARGS library" ON )
option( PUMEX_DOWNLOAD_EXTERNAL_ASSIMP "Download Assimp library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_FREETYPE "Download Freetype2 library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_TBB "Download TBB library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_ZLIB "Download ZLIB library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_PNG "Download PNG library" OFF )
option( PUMEX_DOWNLOAD_EXTERNAL_JPEG "Download JPEG library" OFF )
endif()
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" )
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )
configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Version.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/pumex/Version.h"
)
include( pumex_macros )
include( pumex_externals )
if( ANDROID )
add_library( native_app_glue STATIC
${CMAKE_CURRENT_SOURCE_DIR}/android/native_app_glue/android_native_app_glue.h
${CMAKE_CURRENT_SOURCE_DIR}/android/native_app_glue/android_native_app_glue.c
)
# we could use target_link_options() instead of rg.pumex.viewer these CMAKE_SHARED_LINKER_FLAGS shenanigans,
# but target_link_options() has been added in CMake 3.13
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate")
endif()
set( PUMEX_SHADER_NAMES
shaders/text_draw.vert
shaders/text_draw.frag
shaders/stat_draw.vert
shaders/stat_draw.frag
)
process_shaders( ${CMAKE_CURRENT_LIST_DIR} PUMEX_SHADER_NAMES PUMEX_INPUT_SHADERS PUMEX_OUTPUT_SHADERS )
add_custom_target ( shaders-pumex DEPENDS ${PUMEX_OUTPUT_SHADERS} SOURCES ${PUMEX_INPUT_SHADERS} )
add_custom_command(TARGET shaders-pumex PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/shaders")
set( PUMEX_HEADERS )
set( PUMEX_HEADERS_QT )
list( APPEND PUMEX_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Asset.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetBufferNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetLoaderAssimp.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/AssetNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/BlitImageNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/BoundingBox.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Camera.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/CombinedImageSampler.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Command.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/CopyNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Descriptor.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Device.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/DeviceMemoryAllocator.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/DispatchNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/DrawNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/DrawVerticesNode.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Export.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/FrameBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/HPClock.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Image.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/InputAttachment.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/InputEvent.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Kinematic.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/MaterialSet.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/MemoryBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/MemoryImage.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/MemoryObject.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/MemoryObjectBarrier.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Node.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/NodeVisitor.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/PerObjectData.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/PhysicalDevice.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Pipeline.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Pumex.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Query.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Queue.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderContext.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderPass.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderVisitors.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderGraph.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderGraphCompiler.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/RenderGraphExecution.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Resource.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/ResourceRange.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/SampledImage.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Sampler.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/StandardHandlers.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/StorageBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/StorageImage.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Surface.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Text.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/TextureLoaderGli.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/TimeStatistics.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/UniformBuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Viewer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/Window.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/ActionQueue.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Buffer.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/HashCombine.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Log.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/ReadFile.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/utils/Shapes.h
${CMAKE_CURRENT_BINARY_DIR}/include/pumex/Version.h
)
if(WIN32)
list( APPEND PUMEX_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/win32/HPClockWin32.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/win32/WindowWin32.h
)
elseif(LINUX)
list( APPEND PUMEX_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/linux/WindowXcb.h
)
elseif(ANDROID)
list( APPEND PUMEX_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/android/WindowAndroid.h
)
endif()
if(PUMEX_BUILD_QT)
list( APPEND PUMEX_HEADERS_QT
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/platform/qt/WindowQT.h
)
endif()
if(PUMEX_BUILD_TEXTURE_LOADERS)
list( APPEND PUMEX_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/TextureLoaderPNG.h
${CMAKE_CURRENT_SOURCE_DIR}/include/pumex/TextureLoaderJPEG.h
)
endif()
set( PUMEX_SOURCES )
set( PUMEX_SOURCES_QT )
list( APPEND PUMEX_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Asset.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetBufferNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetLoaderAssimp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/AssetNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/BlitImageNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/BoundingBox.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Camera.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/CombinedImageSampler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Command.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/CopyNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Descriptor.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Device.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/DeviceMemoryAllocator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/DispatchNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/DrawNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/DrawVerticesNode.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/FrameBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Image.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/InputEvent.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/InputAttachment.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Kinematic.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/MaterialSet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/MemoryBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/MemoryImage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/MemoryObject.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/MemoryObjectBarrier.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Node.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/NodeVisitor.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/PerObjectData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/PhysicalDevice.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Pipeline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Query.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Queue.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderContext.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderPass.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderVisitors.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderGraph.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderGraphCompiler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/RenderGraphExecution.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Resource.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/ResourceRange.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/SampledImage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Sampler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/StandardHandlers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/StorageBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/StorageImage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Surface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Text.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/TextureLoaderGli.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/TimeStatistics.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/UniformBuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Viewer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/Window.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/utils/Buffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/utils/Log.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/utils/ReadFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/utils/Shapes.cpp
)
if(WIN32)
list( APPEND PUMEX_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/platform/win32/HPClockWin32.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/platform/win32/WindowWin32.cpp
)
elseif(LINUX)
list( APPEND PUMEX_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/platform/linux/WindowXcb.cpp
)
elseif(ANDROID)
list( APPEND PUMEX_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/platform/android/WindowAndroid.cpp
)
endif()
if(PUMEX_BUILD_QT)
list( APPEND PUMEX_SOURCES_QT
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/platform/qt/WindowQT.cpp
)
endif()
if(PUMEX_BUILD_TEXTURE_LOADERS)
list( APPEND PUMEX_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/TextureLoaderPNG.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/pumex/TextureLoaderJPEG.cpp
)
endif()
set( PUMEX_SOURCES_QT_MOC )
if( PUMEX_BUILD_QT )
qt5_wrap_cpp( PUMEX_SOURCES_QT_MOC ${PUMEX_HEADERS_QT} )
endif()
add_library( pumex SHARED )
target_sources( pumex
PUBLIC
$<BUILD_INTERFACE: ${PUMEX_HEADERS} ${PUMEX_HEADERS_QT}>
PRIVATE
${PUMEX_SOURCES}
${PUMEX_SOURCES_QT}
${PUMEX_SOURCES_QT_MOC}
)
target_include_directories( pumex
PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${PUMEX_PUBLIC_INCLUDES}>
$<INSTALL_INTERFACE:include>
PRIVATE
$<BUILD_INTERFACE:${PUMEX_PRIVATE_INCLUDES}>
)
target_compile_definitions( pumex
PUBLIC
NOMINMAX GLM_ENABLE_EXPERIMENTAL GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE GLM_FORCE_CTOR_INIT
PRIVATE
PUMEX_EXPORTS
)
if(WIN32)
target_compile_definitions( pumex PUBLIC VK_USE_PLATFORM_WIN32_KHR )
elseif(LINUX)
target_compile_definitions( pumex PUBLIC VK_USE_PLATFORM_XCB_KHR )
elseif(ANDROID)
target_compile_definitions( pumex PUBLIC VK_USE_PLATFORM_ANDROID_KHR )
endif()
if(PUMEX_BUILD_TEXTURE_LOADERS)
target_compile_definitions( pumex PRIVATE PUMEX_BUILD_TEXTURE_LOADERS )
endif()
add_dependencies( pumex shaders-pumex )
set_target_properties( pumex PROPERTIES
VERSION ${LIBPUMEX_VERSION}
SOVERSION ${LIBPUMEX_SOVERSION}
RESOURCE "${PUMEX_OUTPUT_SHADERS}"
)
target_link_libraries( pumex
PUBLIC
${PUMEX_LIBRARIES_PUBLIC_DOWNLOADED}
${PUMEX_LIBRARIES_PUBLIC}
PRIVATE
${PUMEX_LIBRARIES_PRIVATE_DOWNLOADED}
${PUMEX_LIBRARIES_PRIVATE}
)
if(ANDROID)
target_include_directories( pumex
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/android/native_app_glue>
)
target_link_libraries( pumex PUBLIC android log )
endif()
set_target_postfixes( pumex )
if( PUMEX_BUILD_EXAMPLES )
add_subdirectory( examples )
endif()
#install( TARGETS pumex
# EXPORT PumexTargets
# ARCHIVE DESTINATION lib COMPONENT libraries
# LIBRARY DESTINATION lib COMPONENT libraries
# RUNTIME DESTINATION bin COMPONENT libraries
# RESOURCE DESTINATION share/pumex/shaders COMPONENT libraries
# )
#install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include COMPONENT headers FILES_MATCHING PATTERN "*.h" )
#install( FILES ${CMAKE_CURRENT_BINARY_DIR}/include/pumex/Version.h DESTINATION include/pumex COMPONENT headers )
#install( DIRECTORY ${INTERMEDIATE_INSTALL_DIR}/include/ DESTINATION include COMPONENT dependencies )
#install( DIRECTORY ${INTERMEDIATE_INSTALL_DIR}/bin/ DESTINATION bin COMPONENT dependencies )
#install( DIRECTORY ${INTERMEDIATE_INSTALL_DIR}/lib/ DESTINATION lib COMPONENT dependencies )
#install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/fonts/ DESTINATION share/pumex/fonts COMPONENT examples )
#install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/people/ DESTINATION share/pumex/people COMPONENT examples )
#install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/sponza/ DESTINATION share/pumex/sponza COMPONENT examples )
#install( EXPORT PumexTargets
# FILE pumex-targets.cmake
# NAMESPACE pumex::
# DESTINATION lib/cmake/pumex
# COMPONENT cmake_files
#)
#install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/pumex-config.cmake DESTINATION lib/cmake/pumex COMPONENT cmake_files )
#
#include( CMakePackageConfigHelpers )
#write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/pumex-config-version.cmake
# VERSION ${LIBPUMEX_VERSION}
# COMPATIBILITY SameMajorVersion
#)
#install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pumex-config-version.cmake DESTINATION lib/cmake/pumex COMPONENT cmake_files )
#
#set( CPACK_PACKAGE_NAME "pumex" )
#set( CPACK_PACKAGE_VENDOR "CMake.org" )
#set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pumex - Vulkan library oriented on high speed rendering" )
#set( CPACK_PACKAGE_VERSION ${LIBPUMEX_VERSION} )
#set( CPACK_PACKAGE_VERSION_MAJOR ${LIBPUMEX_VERSION_MAJOR} )
#set( CPACK_PACKAGE_VERSION_MINOR ${LIBPUMEX_VERSION_MINOR} )
#set( CPACK_PACKAGE_VERSION_PATCH ${LIBPUMEX_VERSION_PATCH} )
#set( CPACK_PACKAGE_INSTALL_DIRECTORY "Pumex" )
#set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE" )
#
#include(CPack)
#
#cpack_add_install_type( Full DISPLAY_NAME "Full install ( development files with examples )" )
#cpack_add_install_type( Developer DISPLAY_NAME "Development files WITHOUT examples" )
#
#cpack_add_component_group( DevGroup DISPLAY_NAME "Development files" DESCRIPTION "All files required to develop your applications using Pumex library" )
#cpack_add_component_group( ExampleApps DISPLAY_NAME "Example applications" DESCRIPTION "Example applications show Pumex library in action" )
#
#cpack_add_component( dependencies
# DISPLAY_NAME "3rd party libraries"
# DESCRIPTION "Libraries that must be installed in order to run Pumex library"
# GROUP DevGroup
# INSTALL_TYPES Developer Full
#)
#cpack_add_component( libraries
# DISPLAY_NAME "Library files"
# DESCRIPTION "Dynamic libraries used to build applications with Pumex library. Libraries are also used by example applications"
# GROUP DevGroup
# INSTALL_TYPES Developer Full
# DEPENDS dependencies
#)
#cpack_add_component( headers
# DISPLAY_NAME "Header files"
# DESCRIPTION "Header files required to write and build applications with Pumex library"
# GROUP DevGroup
# INSTALL_TYPES Developer Full
# DEPENDS libraries
#)
#cpack_add_component( cmake_files
# DISPLAY_NAME "CMake configuration files"
# DESCRIPTION "Files that help find Pumex library and use it in your application"
# GROUP DevGroup
# INSTALL_TYPES Developer Full
# DEPENDS libraries
#)
#cpack_add_component( examples
# DISPLAY_NAME "Example applications"
# DESCRIPTION "Example applications show Pumex library in action"
# GROUP ExampleApps
# INSTALL_TYPES Full
# DEPENDS libraries
#)