meson: Add build option to enable a profiled build.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
parent
6a60834379
commit
99b0421c32
|
@ -2,6 +2,7 @@ vkd3d_common_src = [
|
|||
'debug.c',
|
||||
'memory.c',
|
||||
'utf8.c',
|
||||
'profiling.c'
|
||||
]
|
||||
|
||||
vkd3d_common_lib = static_library('vkd3d_common', vkd3d_common_src,
|
||||
|
|
|
@ -12,6 +12,7 @@ vkd3d_platform = target_machine.system()
|
|||
enable_tests = get_option('enable_tests')
|
||||
enable_extras = get_option('enable_extras')
|
||||
enable_standalone_d3d12 = get_option('enable_standalone_d3d12')
|
||||
enable_profiling = get_option('enable_profiling')
|
||||
|
||||
if vkd3d_platform != 'windows' and enable_standalone_d3d12
|
||||
error('Standalone D3D12 is only supported on Windows.')
|
||||
|
@ -25,6 +26,10 @@ if enable_standalone_d3d12
|
|||
add_project_arguments('-DVKD3D_BUILD_STANDALONE_D3D12', language : 'c')
|
||||
endif
|
||||
|
||||
if enable_profiling
|
||||
add_project_arguments('-DVKD3D_ENABLE_PROFILING', language : 'c')
|
||||
endif
|
||||
|
||||
vkd3d_external_includes = [ './subprojects/Vulkan-Headers/include', './subprojects/SPIRV-Headers/include' ]
|
||||
vkd3d_public_includes = [ './include' ] + vkd3d_external_includes
|
||||
vkd3d_private_includes = [ './include/private' ] + vkd3d_public_includes
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
option('enable_tests', type : 'boolean', value : false)
|
||||
option('enable_extras', type : 'boolean', value : false)
|
||||
option('enable_standalone_d3d12', type : 'boolean', value : false)
|
||||
option('enable_standalone_d3d12', type : 'boolean', value : false)
|
||||
option('enable_profiling', type : 'boolean', value : false)
|
||||
|
|
Loading…
Reference in New Issue