Skip to content

Commit

Permalink
build: fix tracy builds (cataclysmbnteam#4947)
Browse files Browse the repository at this point in the history
* fix: do not use shallow clone for tracy

could've used [blobless clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone) but CMake doesn't seem to support it

* build: use latest tracy

* docs: apt wayland deps
  • Loading branch information
scarf005 authored Jul 7, 2024
1 parent 57aef3b commit 546059b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ if (USE_TRACY)

if (NOT TRACY_VERSION)
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(TRACY_VERSION 30f1b901a9bab40a193c97c77ec82ac70805164d)
set(TRACY_VERSION 6d1deb5640ed11da01995fb1791115cfebe54dbf)
else()
set(TRACY_VERSION v0.10)
endif()
Expand All @@ -288,7 +288,6 @@ if (USE_TRACY)
tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG "${TRACY_VERSION}"
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE)

FetchContent_MakeAvailable(tracy)
Expand Down
9 changes: 6 additions & 3 deletions doc/src/content/docs/en/dev/guides/tracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Both the game and profiler have to be built with same version of tracy to work p
[numerous issues](https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3253#discussion_r1545267113),
The windows version uses [`v0.10`](https://github.com/wolfpld/tracy/releases/tag/v0.10) wheras the
linux version uses
[`30f1b90`](https://github.com/wolfpld/tracy/commit/30f1b901a9bab40a193c97c77ec82ac70805164d).
[`6d1deb5640ed11da01995fb1791115cfebe54dbf`](https://github.com/wolfpld/tracy/commit/6d1deb5640ed11da01995fb1791115cfebe54dbf).

:::

Expand All @@ -24,15 +24,18 @@ linux version uses
```sh
$ git clone https://github.com/wolfpld/tracy
$ cd tracy
$ git checkout 30f1b901a9bab40a193c97c77ec82ac70805164d # the commit used by BN tracy client
$ git checkout 6d1deb5640ed11da01995fb1791115cfebe54dbf # the commit used by BN tracy client
```

1. Clone <https://github.com/wolfpld/tracy>.

```sh
# for ubuntu
# for ubuntu (X11)
$ sudo apt install cmake clang git libcapstone-dev xorg-dev dbus libgtk-3-dev

# for ubuntu (wayland)
$ sudo apt install libglfw-dev libgtk-3-dev libfreetype6-dev libtbb-dev debuginfod libwayland-dev dbus libxkbcommon-dev libglvnd-dev meson cmake git wayland-protocols

# for arch, copied from https://github.com/wolfpld/tracy/blob/master/.github/workflows/linux.yml#L16C12-L16C163
$ pacman -Syu --noconfirm && pacman -S --noconfirm --needed freetype2 tbb debuginfod wayland dbus libxkbcommon libglvnd meson cmake git wayland-protocols
```
Expand Down

0 comments on commit 546059b

Please sign in to comment.