-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
138 lines (117 loc) · 4.88 KB
/
CMakeLists.txt
File metadata and controls
138 lines (117 loc) · 4.88 KB
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
# Copyright (C) 2018-2025 - DevSH Graphics Programming Sp. z O.O.
# This file is part of the "Nabla Engine".
# For conditions of distribution and use, see copyright notice in nabla.h
if(NBL_BUILD_EXAMPLES)
project(NablaExamples)
if(NBL_BUILD_ANDROID)
nbl_android_create_media_storage_apk()
endif()
#! Common api library & precompiled headers for Nabla framework examples
add_subdirectory(common EXCLUDE_FROM_ALL)
#! use "EXCLUDE_FROM_ALL" to exclude an example from the NablaExamples project
#[[
useful if we don't want the example to be tested by CI but still want
the example's project to be generated
https://cmake.org/cmake/help/latest/prop_tgt/EXCLUDE_FROM_ALL.html
]]
# showcase the use of `nbl::core`,`nbl::system` and `nbl::asset`
add_subdirectory(01_HelloCoreSystemAsset)
# showcase the use of `system::IApplicationFramework` and `nbl::video`
add_subdirectory(02_HelloCompute)
# showcase physical device selection, resource embedding and the use of identical headers in HLSL and C++
add_subdirectory(03_DeviceSelectionAndSharedSources)
# showcase the creation of windows and polling for input
add_subdirectory(04_HelloUI)
# showcase the semi-advanced use of Nabla's Streaming Buffers and BDA
add_subdirectory(05_StreamingAndBufferDeviceAddressApp)
# showcase the use of a graphics queue
add_subdirectory(06_HelloGraphicsQueue)
# showcase the set-up of multiple queues
add_subdirectory(07_StagingAndMultipleQueues)
# showcase the set-up of a swapchain and picking of a matching device
add_subdirectory(08_HelloSwapchain)
add_subdirectory(09_GeometryCreator)
# demonstrate the counting sort utility
add_subdirectory(10_CountingSort)
# showcase use of FFT for post-FX Bloom effect
add_subdirectory(11_FFT)
#
add_subdirectory(12_MeshLoaders)
#
add_subdirectory(13_MaterialCompilerTest)
#
add_subdirectory(14_Mortons)
#
if (NBL_BUILD_MITSUBA_LOADER)
add_subdirectory(15_MitsubaLoader)
endif()
add_subdirectory(16_ZipArchiveLoaderTest)
# Waiting for a refactor
#add_subdirectory(27_PLYSTLDemo)
#add_subdirectory(33_Draw3DLine)
# Unit Test Examples
add_subdirectory(20_AllocatorTest)
add_subdirectory(21_LRUCacheUnitTest)
add_subdirectory(22_CppCompat)
add_subdirectory(23_Arithmetic2UnitTest)
add_subdirectory(24_ColorSpaceTest)
add_subdirectory(25_FilterTest EXCLUDE_FROM_ALL)
add_subdirectory(26_Blur)
add_subdirectory(27_MPMCScheduler)
add_subdirectory(28_FFTBloom)
add_subdirectory(29_Arithmetic2Bench)
# add_subdirectory(36_CUDAInterop)
add_subdirectory(31_HLSLPathTracer)
add_subdirectory(34_DebugDraw)
add_subdirectory(37_HLSLSamplingTests)
add_subdirectory(38_EXRSplit)
if (NBL_BUILD_MITSUBA_LOADER)
# if (NBL_BUILD_OPTIX)
# add_subdirectory(39_DenoiserTonemapper)
# endif()
if(NBL_BUILD_IMGUI)
add_subdirectory(40_PathTracer)
endif()
endif()
#add_subdirectory(43_SumAndCDFFilters)
add_subdirectory(47_DerivMapTest EXCLUDE_FROM_ALL)
add_subdirectory(50.IESViewer)
add_subdirectory(54_Transformations EXCLUDE_FROM_ALL)
add_subdirectory(55_RGB18E7S3 EXCLUDE_FROM_ALL)
add_subdirectory(59_QuaternionTests)
add_subdirectory(61_UI)
add_subdirectory(62_CAD EXCLUDE_FROM_ALL) # TODO: Erfan, Przemek, Francisco and co. need to resurrect this
add_subdirectory(62_SchusslerTest EXCLUDE_FROM_ALL)
add_subdirectory(64_EmulatedFloatTest)
add_subdirectory(0_ImportanceSamplingEnvMaps EXCLUDE_FROM_ALL) #TODO: integrate back into 42
add_subdirectory(66_HLSLBxDFTests)
add_subdirectory(67_RayQueryGeometry)
add_subdirectory(68_JpegLoading)
add_subdirectory(70_FLIPFluids)
add_subdirectory(71_RayTracingPipeline)
add_subdirectory(72_CooperativeBinarySearch)
if (NBL_BUILD_MITSUBA_LOADER)
add_subdirectory(73_GeometryInspector)
endif()
add_subdirectory(74_QuantizedSequenceTests)
# add new examples *before* NBL_GET_ALL_TARGETS invocation, it gathers recursively all targets created so far in this subdirectory
NBL_GET_ALL_TARGETS(TARGETS)
# we want to loop only over the examples so we exclude examples' interface libraries created in common subdirectory
list(REMOVE_ITEM TARGETS ${NBL_EXAMPLES_API_TARGET} ${NBL_EXAMPLES_API_LIBRARIES})
# we link common example api library and force examples to reuse its PCH
foreach(T IN LISTS TARGETS)
get_target_property(TYPE ${T} TYPE)
if(NOT ${TYPE} MATCHES INTERFACE)
target_link_libraries(${T} PUBLIC ${NBL_EXAMPLES_API_TARGET})
target_include_directories(${T} PUBLIC $<TARGET_PROPERTY:${NBL_EXAMPLES_API_TARGET},INCLUDE_DIRECTORIES>)
set_target_properties(${T} PROPERTIES DISABLE_PRECOMPILE_HEADERS OFF)
target_precompile_headers(${T} REUSE_FROM "${NBL_EXAMPLES_API_TARGET}")
if(NBL_EMBED_BUILTIN_RESOURCES)
LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsSource)
LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsInclude)
LINK_BUILTIN_RESOURCES_TO_TARGET(${T} NblExtExamplesAPIBuiltinsBuild)
endif()
endif()
endforeach()
NBL_ADJUST_FOLDERS(examples)
endif()