-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[Tracy] Update to 0.13.1 #49197
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
base: master
Are you sure you want to change the base?
[Tracy] Update to 0.13.1 #49197
Conversation
| 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() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
./vcpkg x-add-version --alland committing the result.