tracy
tracy copied to clipboard
WIP: CMake Build System Changes
This PR is currently a WIP. It does not represent a final solution. Some files have been deleted for readability but may be added back for backwards compatibility.
I am submitting this so that there is a readable diff to aid in discussions in #655
TODO: [ ] Support existing CMake options [ ] Retire Meson / point Meson to CMake targets [ ] Correct feature usage using vcpkg for dependencies including platform specific dependencies [ ] Import vcpkg toolchain instead of using the toolchain file (so we can support emscripten toolchains) [ ] Add support for the test application
Major Changes:
- Organise file structure grouping third parties (
vendor
), executables (cmd
) and libraries (currently stayed in root) - Add CMake to each required target and remove the relative path dependencies between libraries
- Uses vcpkg automatic dependency toolchain file
- Falls back to CPM to fetch dependencies which are not supported by vcpkg (nfd)
Executables compile on Windows and Linux when using:
cmake -Bbuild -S. -DTRACY_WITH_EXECUTABLES=ON
cmake --build build --target tracy_executables --parallel # Unix might want -- -j 8 depending on the distro
This output is the executables collected into the same folder. CMake places these in build/cmd/<exec>/Debug/<exec>.exe
on windows. Linux has a few less indirections