Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracy Profiler] Add new port #21826

Merged
merged 27 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ae90975
Adding tracy port
Honeybunch Oct 1, 2021
b1afaa0
Merge branch 'master' of https://github.com/microsoft/vcpkg
Honeybunch Dec 3, 2021
9620db5
Formatting tracy port
Honeybunch Dec 3, 2021
62227bc
Tidying up the port
Honeybunch Dec 3, 2021
f3548ca
Formatting again
Honeybunch Dec 3, 2021
ef284cc
Making sure git-tree is correct
Honeybunch Dec 3, 2021
92b527c
Adding correct vcpkg dependencies
Honeybunch Dec 3, 2021
6aa7c6c
Newline at file end again
Honeybunch Dec 3, 2021
e6043f4
Update version database
Honeybunch Dec 3, 2021
47f6a91
Making sure to mark tracy as not supporting x86 at all
Honeybunch Dec 3, 2021
63e62ff
Updating version again
Honeybunch Dec 3, 2021
4e99428
Responding to feedback and double checking which builds will work
Honeybunch Dec 3, 2021
b3404d6
Updating versions
Honeybunch Dec 3, 2021
fd54195
Tidying up some loose ends
Honeybunch Dec 3, 2021
7d04edf
Updating port version again
Honeybunch Dec 3, 2021
b418dc5
Removing port-version 1
Honeybunch Dec 3, 2021
9a40218
Removing tracy from ci baseline
Honeybunch Dec 7, 2021
549dab2
Removing unnecessary include copy
Honeybunch Dec 10, 2021
63c1d67
Updating version
Honeybunch Dec 10, 2021
6b4ef89
Resolving feedback
Honeybunch Dec 14, 2021
ae47ebb
Updating version and formatting
Honeybunch Dec 14, 2021
2c8cc53
Version for the version god
Honeybunch Dec 14, 2021
f777762
tweaking tracy supports
Honeybunch Dec 14, 2021
31c7302
Formatting and version
Honeybunch Dec 14, 2021
55a41a0
Version
Honeybunch Dec 14, 2021
ff70359
Adding pthreads dependency to tracy for non-windows platforms
Honeybunch Dec 18, 2021
aa52f8e
Version
Honeybunch Dec 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions ports/tracy/add-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fd34587..1ade4464 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@ project(Tracy LANGUAGES CXX)

find_package(Threads REQUIRED)

-add_library(TracyClient TracyClient.cpp)
+add_library(TracyClient STATIC TracyClient.cpp)
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
target_compile_features(TracyClient PUBLIC cxx_std_11)
-target_include_directories(TracyClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(TracyClient PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
target_link_libraries(
TracyClient
PUBLIC
@@ -43,3 +43,29 @@ set_option(TRACY_NO_FRAME_IMAGE "Disable capture of frame images" OFF)
set_option(TRACE_NO_SAMPLING "Disable call stack sampling" OFF)
set_option(TRACY_NO_VERIFY "Disable zone validation for C API" OFF)
set_option(TRACY_NO_VSYNC_CAPTURE "Disable capture of hardware Vsync events" OFF)
+
+include(CMakePackageConfigHelpers)
+include(GNUInstallDirs)
+
+set(Tracy_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Tracy")
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
+
+set(includes
+ ${CMAKE_CURRENT_LIST_DIR}/TracyC.h
+ ${CMAKE_CURRENT_LIST_DIR}/Tracy.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyD3D11.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyD3D12.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyLua.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyOpenCL.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyOpenGL.hpp
+ ${CMAKE_CURRENT_LIST_DIR}/TracyVulkan.hpp)
+
+install(TARGETS TracyClient
+ EXPORT TracyConfig
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(FILES ${includes}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(EXPORT TracyConfig
+ FILE TracyConfig.cmake
+ DESTINATION ${Tracy_INSTALL_CMAKEDIR})
\ No newline at end of file
34 changes: 34 additions & 0 deletions ports/tracy/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wolfpld/tracy
REF b7a27d02afe1941eed8f64f2164447ff1a06daa6
SHA512 027adffc1e362610016a86c7e37c97dc836d14ca0c8579281f0d53c443c58c206ad80d33936a18668c2695b9009cbbb7acbc16ec516b83f796870dc527e469e1
HEAD_REF master
PATCHES
add-install.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)

Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
)

vcpkg_cmake_install()

vcpkg_copy_pdbs()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Tracy)
vcpkg_fixup_pkgconfig()

# Need to manually copy headers
file(GLOB INCLUDES ${CURRENT_PACKAGES_DIR}/include/*)
file(COPY ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved

# Cleanup
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
18 changes: 18 additions & 0 deletions ports/tracy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "tracy",
"version-string": "0.7.8",
"port-version": 1,
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
"description": "A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.",
"homepage": "https://github.com/wolfpld/tracy",
"supports": "!(uwp | x86) & !(arm & windows)",
"dependencies": [
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 2 additions & 0 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,8 @@ torch-th:arm64-windows=fail
torch-th:arm-uwp=fail
torch-th:x64-uwp=fail
torch-th:x64-windows-static=fail
tracy:arm64-windows=fail
tracy:x86-windows=fail
Honeybunch marked this conversation as resolved.
Show resolved Hide resolved
tre:x64-osx=fail
treehopper:x64-windows-static=fail
treehopper:x64-linux=fail
Expand Down
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6860,6 +6860,10 @@
"baseline": "2019-04-19",
"port-version": 3
},
"tracy": {
"baseline": "0.7.8",
"port-version": 1
},
"transwarp": {
"baseline": "2.2.2",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/t-/tracy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "5257ed381677f3093f2a68f3e5c26b527ab284ee",
"version-string": "0.7.8",
"port-version": 1
}
]
}