Skip to content

Conversation

@Gurgarath
Copy link

@Gurgarath Gurgarath commented Jan 2, 2026

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Comment on lines +47 to +67
if(EXISTS "${CURRENT_PACKAGES_DIR}/include/tracy/tracy")
message(STATUS "Flattening include/tracy/tracy...")

file(GLOB INNER_FILES "${CURRENT_PACKAGES_DIR}/include/tracy/tracy/*")
file(COPY ${INNER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/tracy")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/tracy/tracy")
endif()

message(STATUS "Patching headers to fix relative includes...")
file(GLOB_RECURSE TRACY_HEADERS "${CURRENT_PACKAGES_DIR}/include/tracy/*.hpp" "${CURRENT_PACKAGES_DIR}/include/tracy/*.h")

foreach(HEADER ${TRACY_HEADERS})
file(READ "${HEADER}" _contents)

string(REPLACE "../common" "common" _contents "${_contents}")
string(REPLACE "../client" "client" _contents "${_contents}")
string(REPLACE "../libbacktrace" "libbacktrace" _contents "${_contents}")

file(WRITE "${HEADER}" "${_contents}")
endforeach()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this change upstreams intended usage?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually restores it. The former versions (including the current one on vcpkg) only has "tracy". So files were included using:

#include <tracy/Tracy.hpp>

Now, with the addition of common and client in more recent versions, the includes became:

#include <tracy/tracy/Tracy.hpp>

This little patch is the one allowing us to keep on using the former includes without having to add a redundant tracy/tracy. Someone I know using this package used my patch and was also able to update seamlessly. I am running it also on my static windows x64.

Please note that I'm new into maintaining vcpkg packages so if I did something I shouldn't, feel free to remove this PR, or point me in the right direction

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume that include/tracy is meant to be part of include search path, and that this is carried by the INTERFACE_LINK_LIBRARIES property of the the CMake config. And then #include <tracy/Tracy.hpp> would break instead of being fixed when files are moved out of include/tracy/tracy.
Users of uninformed build systems (msbuild at al.) must adjust the include search path manually.

@vicroms vicroms marked this pull request as draft January 7, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants