update tracy from 11.0 to 13.1 and fix build with tracy enabled
This commit is contained in:
+18
-10
@@ -1,4 +1,4 @@
|
||||
project('tracy', ['cpp'], version: '0.11.0', meson_version: '>=1.1.0')
|
||||
project('tracy', ['cpp'], version: '0.13.1', meson_version: '>=1.3.0', default_options : ['cpp_std=c++11'])
|
||||
|
||||
# internal compiler flags
|
||||
tracy_compile_args = []
|
||||
@@ -17,8 +17,8 @@ if get_option('on_demand')
|
||||
tracy_common_args += ['-DTRACY_ON_DEMAND']
|
||||
endif
|
||||
|
||||
if get_option('callstack')
|
||||
tracy_common_args += ['-DTRACY_CALLSTACK']
|
||||
if get_option('callstack') > 0
|
||||
tracy_common_args += ['-DTRACY_CALLSTACK='+get_option('callstack').to_string()]
|
||||
endif
|
||||
|
||||
if get_option('no_callstack')
|
||||
@@ -119,6 +119,10 @@ if get_option('debuginfod')
|
||||
tracy_public_deps += dependency('libdebuginfod')
|
||||
endif
|
||||
|
||||
if get_option('ignore_memory_faults')
|
||||
tracy_common_args += ['-DTRACY_IGNORE_MEMORY_FAULTS']
|
||||
endif
|
||||
|
||||
tracy_shared_libs = get_option('default_library') == 'shared'
|
||||
|
||||
if tracy_shared_libs
|
||||
@@ -132,6 +136,7 @@ endif
|
||||
includes = [
|
||||
'public/tracy/TracyC.h',
|
||||
'public/tracy/Tracy.hpp',
|
||||
'public/tracy/TracyCUDA.hpp',
|
||||
'public/tracy/TracyD3D11.hpp',
|
||||
'public/tracy/TracyD3D12.hpp',
|
||||
'public/tracy/TracyLua.hpp',
|
||||
@@ -150,6 +155,7 @@ client_includes = [
|
||||
'public/client/TracyDebug.hpp',
|
||||
'public/client/TracyDxt1.hpp',
|
||||
'public/client/TracyFastVector.hpp',
|
||||
'public/client/TracyKCore.hpp',
|
||||
'public/client/TracyLock.hpp',
|
||||
'public/client/TracyProfiler.hpp',
|
||||
'public/client/TracyRingBuffer.hpp',
|
||||
@@ -175,7 +181,7 @@ common_includes = [
|
||||
'public/common/TracySocket.hpp',
|
||||
'public/common/TracyStackFrames.hpp',
|
||||
'public/common/TracySystem.hpp',
|
||||
'public/common/TracyUwp.hpp',
|
||||
'public/common/TracyWinFamily.hpp',
|
||||
'public/common/TracyYield.hpp'
|
||||
]
|
||||
|
||||
@@ -189,8 +195,9 @@ tracy_public_include_dirs = include_directories('public')
|
||||
|
||||
compiler = meson.get_compiler('cpp')
|
||||
override_options = []
|
||||
if compiler.get_id() != 'msvc' and compiler.get_id() != 'clang-cl'
|
||||
override_options += 'cpp_std=c++11'
|
||||
# MSVC c++ lib does not work properly with C++11 and compilation may fail
|
||||
if compiler.has_define('_MSC_VER') and get_option('cpp_std') == 'c++11'
|
||||
override_options += 'cpp_std=c++14'
|
||||
endif
|
||||
|
||||
tracy_compile_args += tracy_common_args
|
||||
@@ -204,9 +211,9 @@ tracy = library('tracy', tracy_src, tracy_header_files,
|
||||
override_options : override_options,
|
||||
install : true)
|
||||
|
||||
install_headers(includes, subdir : 'tracy')
|
||||
install_headers(common_includes, subdir : 'common')
|
||||
install_headers(client_includes, subdir : 'client')
|
||||
install_headers(includes, subdir : 'tracy/tracy')
|
||||
install_headers(common_includes, subdir : 'tracy/common')
|
||||
install_headers(client_includes, subdir : 'tracy/client')
|
||||
|
||||
tracy_dep_compile_args = tracy_common_args
|
||||
|
||||
@@ -217,7 +224,8 @@ endif
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(tracy,
|
||||
extra_cflags : tracy_dep_compile_args,
|
||||
requires : tracy_public_deps)
|
||||
requires : tracy_public_deps,
|
||||
libraries: [tracy])
|
||||
|
||||
tracy_dep = declare_dependency(
|
||||
compile_args : tracy_dep_compile_args,
|
||||
|
||||
Reference in New Issue
Block a user