diff --git a/imgui/meson.build b/imgui/meson.build new file mode 100644 index 00000000..5e24794f --- /dev/null +++ b/imgui/meson.build @@ -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) diff --git a/meson.build b/meson.build index 54a81c0f..1a9dc7ed 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index ecf6ea1e..48027bb4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/profiler/meson.build b/profiler/meson.build new file mode 100644 index 00000000..1ae19ab9 --- /dev/null +++ b/profiler/meson.build @@ -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]) \ No newline at end of file diff --git a/server/meson.build b/server/meson.build new file mode 100644 index 00000000..662a7322 --- /dev/null +++ b/server/meson.build @@ -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) \ No newline at end of file