mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
meson: Propagate defines to dependents
This way they don't have to set them manually.
This commit is contained in:
parent
6796c6fd91
commit
e93cf6d08a
50
meson.build
50
meson.build
@ -1,87 +1,89 @@
|
|||||||
project('tracy', ['cpp'], version: '0.10.0')
|
project('tracy', ['cpp'], version: '0.10.0')
|
||||||
|
|
||||||
|
tracy_compile_args = []
|
||||||
|
|
||||||
if get_option('tracy_enable')
|
if get_option('tracy_enable')
|
||||||
add_project_arguments('-DTRACY_ENABLE', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_ENABLE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_on_demand')
|
if get_option('tracy_on_demand')
|
||||||
add_project_arguments('-DTRACY_ON_DEMAND', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_ON_DEMAND']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_callstack')
|
if get_option('tracy_callstack')
|
||||||
add_project_arguments('-DTRACY_CALLSTACK', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_CALLSTACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_callstack')
|
if get_option('tracy_no_callstack')
|
||||||
add_project_arguments('-DTRACY_NO_CALLSTACK', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_CALLSTACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_callstack_inlines')
|
if get_option('tracy_no_callstack_inlines')
|
||||||
add_project_arguments('-DTRACY_NO_CALLSTACK_INLINES', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_CALLSTACK_INLINES']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_only_localhost')
|
if get_option('tracy_only_localhost')
|
||||||
add_project_arguments('-DTRACY_ONLY_LOCALHOST', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_ONLY_LOCALHOST']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_broadcast')
|
if get_option('tracy_no_broadcast')
|
||||||
add_project_arguments('-DTRACY_NO_BROADCAST', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_BROADCAST']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_only_ipv4')
|
if get_option('tracy_only_ipv4')
|
||||||
add_project_arguments('-DTRACY_ONLY_IPV4', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_ONLY_IPV4']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_code_transfer')
|
if get_option('tracy_no_code_transfer')
|
||||||
add_project_arguments('-DTRACY_NO_CODE_TRANSFER', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_CODE_TRANSFER']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_context_switch')
|
if get_option('tracy_no_context_switch')
|
||||||
add_project_arguments('-DTRACY_NO_CONTEXT_SWITCH', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_CONTEXT_SWITCH']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_exit')
|
if get_option('tracy_no_exit')
|
||||||
add_project_arguments('-DTRACY_NO_EXIT', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_EXIT']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_sampling')
|
if get_option('tracy_no_sampling')
|
||||||
add_project_arguments('-DTRACY_NO_SAMPLING', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_SAMPLING']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_verify')
|
if get_option('tracy_no_verify')
|
||||||
add_project_arguments('-DTRACY_NO_VERIFY', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_VERIFY']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_vsync_capture')
|
if get_option('tracy_no_vsync_capture')
|
||||||
add_project_arguments('-DTRACY_NO_VSYNC_CAPTURE', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_VSYNC_CAPTURE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_frame_image')
|
if get_option('tracy_no_frame_image')
|
||||||
add_project_arguments('-DTRACY_NO_FRAME_IMAGE', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_FRAME_IMAGE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_system_tracing')
|
if get_option('tracy_no_system_tracing')
|
||||||
add_project_arguments('-DTRACY_NO_SYSTEM_TRACING', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_SYSTEM_TRACING']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_patchable_nopsleds')
|
if get_option('tracy_patchable_nopsleds')
|
||||||
add_project_arguments('-DTRACY_PATCHABLE_NOPSLEDS', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_PATCHABLE_NOPSLEDS']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_delayed_init')
|
if get_option('tracy_delayed_init')
|
||||||
add_project_arguments('-DTRACY_DELAYED_INIT', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_DELAYED_INIT']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_manual_lifetime')
|
if get_option('tracy_manual_lifetime')
|
||||||
add_project_arguments('-DTRACY_MANUAL_LIFETIME', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_MANUAL_LIFETIME']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_fibers')
|
if get_option('tracy_fibers')
|
||||||
add_project_arguments('-DTRACY_FIBERS', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_FIBERS']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_timer_fallback')
|
if get_option('tracy_timer_fallback')
|
||||||
add_project_arguments('-DTRACY_TIMER_FALLBACK', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_TIMER_FALLBACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tracy_shared_libs = get_option('tracy_shared_libs')
|
tracy_shared_libs = get_option('tracy_shared_libs')
|
||||||
@ -90,9 +92,11 @@ if tracy_shared_libs
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_crash_handler')
|
if get_option('tracy_no_crash_handler')
|
||||||
add_project_arguments('-DTRACY_NO_CRASH_HANDLER', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_NO_CRASH_HANDLER']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
add_project_arguments(tracy_compile_args, language : 'cpp')
|
||||||
|
|
||||||
threads_dep = dependency('threads')
|
threads_dep = dependency('threads')
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
@ -180,7 +184,7 @@ install_headers(includes)
|
|||||||
install_headers(common_includes, subdir : 'common')
|
install_headers(common_includes, subdir : 'common')
|
||||||
install_headers(client_includes, subdir : 'client')
|
install_headers(client_includes, subdir : 'client')
|
||||||
|
|
||||||
tracy_dep_compile_args = []
|
tracy_dep_compile_args = tracy_compile_args
|
||||||
|
|
||||||
if tracy_shared_libs
|
if tracy_shared_libs
|
||||||
tracy_dep_compile_args += [ '-DTRACY_IMPORTS' ]
|
tracy_dep_compile_args += [ '-DTRACY_IMPORTS' ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user