You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
# -*- python -*-
|
|
|
|
from waflib import Context
|
|
defs = getattr(Context.g_module, 'TRACY_DEFINES', [])
|
|
|
|
def options(ctx):
|
|
ctx.with_opt('tracy', ['bundle', 'none'], 'none')
|
|
|
|
def configure(ctx):
|
|
def bundle_tracy(ctx):
|
|
ctx.env.append_value('DEFINES_TRACY', 'TRACY_ENABLE')
|
|
ctx.env.append_value('SYSTEM_INCLUDES_TRACY',
|
|
ctx.path.find_dir('tracy/public').abspath())
|
|
|
|
# bsd only?
|
|
ctx.check_cc(lib='execinfo', mandatory=False)
|
|
|
|
ctx.with_chk('tracy', {'bundle': bundle_tracy, 'none': 'include_stub'},
|
|
define='LIBSHIT_WITH_TRACY')
|
|
|
|
if ctx.env.CROSS:
|
|
def fun(ctx, prefix):
|
|
ctx.env.SYSTEM_INCLUDES_TRACY = \
|
|
ctx.path.find_dir('include_stub').abspath()
|
|
ctx.env.WITH_TRACY = 'none'
|
|
ctx.env.append_value('DEFINES_TRACY', 'LIBSHIT_WITH_TRACY=0')
|
|
ctx.only_host_env(fun)
|
|
|
|
|
|
def build(ctx):
|
|
if ctx.env.WITH_TRACY != 'bundle': return
|
|
|
|
ctx.objects(idx = 51500,
|
|
source = ['tracy/public/TracyClient.cpp'],
|
|
use = 'TRACY DL PTHREAD EXECINFO',
|
|
defines = defs,
|
|
target = 'tracy',
|
|
uselib = 'EXT')
|