diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/tracy | |
Diffstat (limited to 'vcpkg/ports/tracy')
| -rw-r--r-- | vcpkg/ports/tracy/build-tools.patch | 38 | ||||
| -rw-r--r-- | vcpkg/ports/tracy/portfile.cmake | 73 | ||||
| -rw-r--r-- | vcpkg/ports/tracy/vcpkg.json | 90 |
3 files changed, 201 insertions, 0 deletions
diff --git a/vcpkg/ports/tracy/build-tools.patch b/vcpkg/ports/tracy/build-tools.patch new file mode 100644 index 0000000..8c0cb2e --- /dev/null +++ b/vcpkg/ports/tracy/build-tools.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 72901a8c..365724a8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -193,3 +193,15 @@ if(TRACY_CLIENT_PYTHON) + + add_subdirectory(python) + endif() ++ ++option(VCPKG_CLI_TOOLS "library" OFF) ++option(VCPKG_GUI_TOOLS "library" OFF) ++if(VCPKG_CLI_TOOLS) ++ add_subdirectory(csvexport) ++ add_subdirectory(capture) ++ add_subdirectory(import) ++ add_subdirectory(update) ++endif() ++if(VCPKG_GUI_TOOLS) ++ add_subdirectory(profiler) ++endif() +diff --git a/cmake/server.cmake b/cmake/server.cmake +index c12a3408..0d55cf91 100644 +--- a/cmake/server.cmake ++++ b/cmake/server.cmake +@@ -1,3 +1,4 @@ ++include_guard(GLOBAL) + set(TRACY_COMMON_DIR ${CMAKE_CURRENT_LIST_DIR}/../public/common) + + set(TRACY_COMMON_SOURCES +diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake +index 29f12cfa..40b3e078 100644 +--- a/cmake/vendor.cmake ++++ b/cmake/vendor.cmake +@@ -1,3 +1,4 @@ ++include_guard(GLOBAL) + # Vendor Specific CMake + # The Tracy project keeps most vendor source locally + diff --git a/vcpkg/ports/tracy/portfile.cmake b/vcpkg/ports/tracy/portfile.cmake new file mode 100644 index 0000000..a457116 --- /dev/null +++ b/vcpkg/ports/tracy/portfile.cmake @@ -0,0 +1,73 @@ +vcpkg_download_distfile(PATCH_MISSING_CHRONO_INCLUDE + URLS https://github.com/wolfpld/tracy/commit/50ff279aaddfd91dc3cdcfd5b7aec3978e63da25.diff?full_index=1 + SHA512 f9594297ea68612b68bd631497cd312ea01b34280a0f098de0d2b99810149345251a8985a6430337d0b55d2f181ceac10d563b64cfe48f78959f79ec7a6ea3b5 + FILENAME wolfpld-tracy-PR982.diff +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wolfpld/tracy + REF "v${VERSION}" + SHA512 d3d99284e3c3172236c3f02b3bc52df111ef650fb8609e54fb3302ece28e55a06cd16713ed532f1e1aad66678ff09639dfc7e01a1e96880fb923b267a1b1b79b + HEAD_REF master + PATCHES + build-tools.patch + "${PATCH_MISSING_CHRONO_INCLUDE}" +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + on-demand TRACY_ON_DEMAND + fibers TRACY_FIBERS + verbose TRACY_VERBOSE + INVERTED_FEATURES + crash-handler TRACY_NO_CRASH_HANDLER +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS TOOLS_OPTIONS + FEATURES + cli-tools VCPKG_CLI_TOOLS + gui-tools VCPKG_GUI_TOOLS +) + +if("cli-tools" IN_LIST FEATURES OR "gui-tools" IN_LIST FEATURES) + vcpkg_find_acquire_program(PKGCONFIG) + list(APPEND TOOLS_OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DDOWNLOAD_CAPSTONE=OFF + -DLEGACY=ON + ${FEATURE_OPTIONS} + OPTIONS_RELEASE + ${TOOLS_OPTIONS} + MAYBE_UNUSED_VARIABLES + DOWNLOAD_CAPSTONE + LEGACY +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(PACKAGE_NAME Tracy) + +function(tracy_copy_tool tool_name tool_dir) + vcpkg_copy_tools( + TOOL_NAMES "${tool_name}" + SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${tool_dir}" + ) +endfunction() + +if("cli-tools" IN_LIST FEATURES) + tracy_copy_tool(tracy-capture capture) + tracy_copy_tool(tracy-csvexport csvexport) + tracy_copy_tool(tracy-import-chrome import) + tracy_copy_tool(tracy-import-fuchsia import) + tracy_copy_tool(tracy-update update) +endif() +if("gui-tools" IN_LIST FEATURES) + tracy_copy_tool(tracy-profiler profiler) +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/vcpkg/ports/tracy/vcpkg.json b/vcpkg/ports/tracy/vcpkg.json new file mode 100644 index 0000000..d7ca968 --- /dev/null +++ b/vcpkg/ports/tracy/vcpkg.json @@ -0,0 +1,90 @@ +{ + "name": "tracy", + "version": "0.11.1", + "port-version": 2, + "description": "A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.", + "homepage": "https://github.com/wolfpld/tracy", + "license": "BSD-3-Clause", + "supports": "!(windows & (arm | uwp))", + "dependencies": [ + { + "name": "pthreads", + "platform": "!windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "crash-handler" + ], + "features": { + "cli-tools": { + "description": "Build Tracy command-line tools: `capture`, `csvexport`, `import-chrome`, `import-fuchsia` and `update`", + "supports": "!(windows & x86)", + "dependencies": [ + { + "name": "capstone", + "features": [ + "arm", + "arm64", + "x86" + ] + }, + { + "name": "dbus", + "default-features": false, + "platform": "!windows" + }, + "freetype", + "glfw3", + { + "name": "tbb", + "platform": "!windows" + } + ] + }, + "crash-handler": { + "description": "Enable crash handler" + }, + "fibers": { + "description": "Enable fibers support" + }, + "gui-tools": { + "description": "Build Tracy GUI tool: `profiler` (aka `Tracy` executable)", + "supports": "!(windows & x86)", + "dependencies": [ + { + "name": "capstone", + "features": [ + "arm", + "arm64", + "x86" + ] + }, + { + "name": "dbus", + "default-features": false, + "platform": "!windows" + }, + "freetype", + "glfw3", + { + "name": "tbb", + "platform": "!windows" + } + ] + }, + "on-demand": { + "description": "Enable on-demand profiling" + }, + "verbose": { + "description": "Enables verbose logging" + } + } +} |