1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Updated to build profiler

This commit is contained in:
Tyler Mayoff 2022-08-06 20:09:13 -04:00
parent 46292b0719
commit ee7bd300e9
No known key found for this signature in database
GPG Key ID: 9318A9286352802A
5 changed files with 81 additions and 8 deletions

5
imgui/meson.build Normal file
View File

@ -0,0 +1,5 @@
imgui_sources = files('imgui.cpp', 'imgui_draw.cpp', 'imgui_tables.cpp', 'imgui_widgets.cpp')
imgui_inc = include_directories('.')
imgui_lib = library('imgui_lib', imgui_sources, include_directories: imgui_inc)
imgui_dep = declare_dependency(include_directories: imgui_inc, link_with: imgui_lib)

View File

@ -89,9 +89,21 @@ if get_option('tracy_no_crash_handler')
add_project_arguments('-DTRACY_NO_CRASH_HANDLER', language : 'cpp')
endif
if get_option('tracy_use_wayland')
add_project_arguments('-DDISPLAY_SERVER_WAYLAND', language: 'cpp')
else
add_project_arguments('-DDISPLAY_SERVER_X11', language: 'cpp')
endif
if not get_option('tracy_gtk_fileselector')
if get_option('tracy_no_fileselector')
add_project_arguments('-DTRACY_NO_FILESELECTOR', language: 'cpp')
endif
endif
threads_dep = dependency('threads')
includes = [
includes = files(
'TracyC.h',
'Tracy.hpp',
'TracyD3D11.hpp',
@ -100,9 +112,9 @@ includes = [
'TracyOpenCL.hpp',
'TracyOpenGL.hpp',
'TracyVulkan.hpp'
]
)
client_includes = [
client_includes = files(
'client/tracy_concurrentqueue.h',
'client/tracy_rpmalloc.hpp',
'client/tracy_SPSCQueue.h',
@ -120,9 +132,9 @@ client_includes = [
'client/TracySysTime.hpp',
'client/TracySysTrace.hpp',
'client/TracyThread.hpp'
]
)
common_includes = [
common_includes = files(
'common/tracy_lz4.hpp',
'common/tracy_lz4hc.hpp',
'common/TracyAlign.hpp',
@ -139,13 +151,13 @@ common_includes = [
'common/TracySystem.hpp',
'common/TracyUwp.hpp',
'common/TracyYield.hpp'
]
)
tracy_header_files = common_includes + client_includes + includes
tracy_src = [
tracy_src = files(
'TracyClient.cpp'
]
)
tracy_public_include_dirs = include_directories('.')
@ -188,3 +200,7 @@ tracy_dep_dynamic = declare_dependency(
include_directories : tracy_public_include_dirs)
meson.override_dependency('tracy', tracy_dep)
subdir('imgui')
subdir('server')
subdir('profiler')

View File

@ -20,3 +20,7 @@ option('tracy_manual_lifetime', type : 'boolean', value : false, description : '
option('tracy_fibers', type : 'boolean', value : false, description : 'Enable fibers support')
option('tracy_shared_libs', type : 'boolean', value : false, description : 'Builds Tracy as a shared object')
option('tracy_no_crash_handler', type : 'boolean', value : false, description : 'Disable crash handling')
option('tracy_use_wayland', type : 'boolean', value : false, description : 'Profiler: Set the Display Server on linux to wayland')
option('tracy_no_fileselector', type : 'boolean', value : true, description : 'Profiler: Disable fileselector')
option('tracy_gtk_fileselector', type : 'boolean', value : false, description : 'Profiler: Set the fileselector to native GTK')

21
profiler/meson.build Normal file
View File

@ -0,0 +1,21 @@
profiler_sources = files(
'src/main.cpp',
'src/BackendGlfw.cpp',
'src/ConnectionHistory.cpp',
'src/Filters.cpp',
'src/Fonts.cpp',
'src/HttpRequest.cpp',
'src/ImGuiContext.cpp',
'src/ResolvService.cpp',
'src/RunQueue.cpp',
'src/WindowPosition.cpp')
if get_option('tracy_gtk_fileselector')
profiler_sources += files('../nfd/nfd_gtk.cpp')
endif
profiler_inc = include_directories('src', 'src/imgui')
glfw = dependency('glfw3')
executable('profiler', profiler_sources, include_directories: profiler_inc, dependencies: [glfw, threads_dep, server_dep, tracy_dep])

27
server/meson.build Normal file
View File

@ -0,0 +1,27 @@
server_sources = files(
'TracyBadVersion.cpp',
'TracyColor.cpp',
# 'TracyEventDebug.cpp',
'TracyFilesystem.cpp',
'TracyImGui.cpp',
'TracyMemory.cpp',
'TracyMicroArchitecture.cpp',
'TracyMmap.cpp',
'TracyMouse.cpp',
'TracyPrint.cpp',
'TracyProtoHistory.cpp',
'TracySourceContents.cpp',
'TracySourceTokenizer.cpp',
'TracySourceView.cpp',
'TracyStorage.cpp',
'TracyTaskDispatch.cpp',
'TracyTexture.cpp',
'TracyTextureCompression.cpp',
'TracyThreadCompression.cpp',
'TracyTexture.cpp')
capstone = dependency('capstone')
deps = [imgui_dep, capstone, tracy_dep]
server_lib = static_library('tracy_server', server_sources, dependencies: deps)
server_dep = declare_dependency(dependencies: deps, link_with: server_lib)