8000 Fix vendor.cmake by gav2xlin · Pull Request #1082 · wolfpld/tracy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix vendor.cmake #1082

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

Closed
wants to merge 1 commit into from
Closed

Conversation

gav2xlin
Copy link
@gav2xlin gav2xlin commented Jun 21, 2025

Your latest releases cannot be used (without hacks and patches) with vcpkg and Homebrew because they prohibit external downloads that CPM.cmake does

pkg_check_modules(CAPSTONE capstone)
pkg_check_modules(GLFW glfw3)
pkg_check_modules(FREETYPE freetype2)
...
https://github.com/Homebrew/homebrew-core/blob/badf764aab60b495bb699e23ab3b1633f588df50/Formula/t/tracy.rb
depends_on "glfw"
depends_on "capstone"
depends_on "freetype"

https://github.com/microsoft/vcpkg/blob/master/ports/tracy/vcpkg.json
"dependencies": [
{
"name": "capstone",
"features": [
"arm",
"arm64",
"x86"
]
},
...
"freetype",
"glfw3",
...
]

Please, use the same approach and check that modules are already installed:

pkg_check_modules(ZSTD libzstd)
pkg_check_modules(ImGui imgui)
pkg_check_modules(NFD nfd)
pkg_check_modules(PPQSORT ppqsort)

(I'm checking that these names and CMake variables are correct)
https://github.com/btzy/nativefiledialog-extended/blob/master/src/CMakeLists.txt nfd
https://github.com/GabTux/PPQSort/blob/master/standalone/CMakeLists.txt PPQSort::PPQSort
https://github.com/facebook/zstd/tree/dev/lib

O_o
https://github.com/conan-io/conan-center-index/blob/master/recipes/imgui/all/CMakeLists.txt
https://github.com/microsoft/vcpkg/blob/master/ports/imgui/CMakeLists.txt

for package managers such as vcpkg and homebrew
@wolfpld
Copy link
Owner
wolfpld commented Jun 21, 2025

I don't understand how you expect this to work, when there's a need for specific patches to be applied (which you are just ignoring), or when the library explicitly forbids what you want to do (as explained in #1079).

The amount of libraries retrieved via CPM will only increase, and downstream needs to adapt to this.

See https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=moderncore if you need guidance.

@wolfpld wolfpld closed this Jun 21, 2025
@gav2xlin
Copy link
Author
gav2xlin commented Jun 21, 2025

@wolfpld I see

CPM.cmake and FetchContent() can be disabled:

-DCPM_LOCAL_PACKAGES_ONLY=ON
-DCPM_DONT_UPDATE_MODULE_PATH=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS

find_package() is called inside CPMAddPackage()

That's my workaround
Homebrew/homebrew-core#227617
microsoft/vcpkg#46063

These changes are not finished

@dg0yt
Copy link
dg0yt commented Jun 21, 2025

The amount of libraries retrieved via CPM will only increase, and downstream needs to adapt to this.

Will this increase be limited to what is used by the executables, or will it also affect the libraries?

@wolfpld
Copy link
Owner
wolfpld commented Jun 21, 2025

I don't expect the libraries to be affected. The intention is that you can just dump the Tracy client sources into your application and have everything working with minimal effort required.

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
0