meson: Add tracy_public_deps list

Currently functionally identical to before. Will be used in a subsequent
commit for libunwind, which appears in a public header.
This commit is contained in:
Ivan Molodetskikh 2023-12-12 08:04:41 +04:00
parent 9bc014b183
commit c0e4652edf

View File

@ -6,6 +6,9 @@ tracy_compile_args = []
# compiler flags shared between the capture library itself and the code using it
tracy_common_args = []
# dependencies that will be propagated to the users of the capture library
tracy_public_deps = []
if get_option('tracy_enable')
tracy_common_args += ['-DTRACY_ENABLE']
endif
@ -103,8 +106,6 @@ if tracy_shared_libs
tracy_compile_args += ['-DTRACY_EXPORTS']
endif
threads_dep = dependency('threads')
if host_machine.system() == 'windows'
tracy_compile_args += ['-DWINVER=0x0601', '-D_WIN32_WINNT=0x0601']
endif
@ -175,8 +176,10 @@ endif
tracy_compile_args += tracy_common_args
tracy_deps = [dependency('threads')] + tracy_public_deps
tracy = library('tracy', tracy_src, tracy_header_files,
dependencies : [ threads_dep ],
dependencies : tracy_deps,
include_directories : tracy_public_include_dirs,
cpp_args : tracy_compile_args,
override_options : override_options,
@ -193,7 +196,9 @@ if tracy_shared_libs
endif
pkg = import('pkgconfig')
pkg.generate(tracy, extra_cflags: tracy_dep_compile_args)
pkg.generate(tracy,
extra_cflags : tracy_dep_compile_args,
requires : tracy_public_deps)
tracy_dep = declare_dependency(
compile_args : tracy_dep_compile_args,