Ability to extract Tracy version from installed package #1271
Copy link
Copy link
Closed
Description
Hi!
It would be nice to have the ability to extract tracy version during build time for user project with prebuilt Tracy static library.
In other words, it is hard to detect a Tracy version after installation.
For example, I prebuilt Tracy as a static library with usual cmake flow: cmake generate, cmake build, cmake install.
It would be great if TracyConfig.cmake exports its version, so I could do the following:
find_package(Tracy REQUIRED CONFIG)
message(STATUS "Using Tracy version: ${TRACY_VERSION_STRING}")Other way is that I parse TracyVersion.hpp myself and generate version string, but it is not included in installed package. It would be nice to add TracyVersion.hpp to common_includes variable in root CMakeLists.txt.
Best regards.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
wolfpld commentedon Feb 6, 2026
cmake/version.cmakecodelimit commentedon Feb 6, 2026
I understand that it exists in src dir, but there is no such file in installed package.
Consider I have a project, where I prebuild thirdparty libs. Usually I do this in the following way:
cmake -G "Visual Studio 17 2022" -A x64 -B .build -DTRACY_STATIC=ON cmake --build .build --config=RelWithDebInfo cmake --install .build --prefix=/abs/path/to/my/project/thirdparty_libsResulting output after install is:
Then, in my proj CMakeLists.txt I do:
It would be great if version.cmake will be automatically copied during install step, so it is not necessary any manual copying.
wolfpld commentedon Aug 19, 2026
Fixed in e3cde05.