add backward-cpp library dependency + tracy abbr

This commit is contained in:
2026-02-24 17:04:58 +01:00
parent e7d4170b77
commit 1347abad34
2 changed files with 8 additions and 4 deletions

View File

@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 26)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(raylib REQUIRED)
find_package(Backward REQUIRED)
# Need to enable/disable this based on a variable for nix build
if(USE_TRACY)
@ -43,14 +44,15 @@ add_executable(masssprings
src/state.cpp
src/input.cpp
src/tracy.cpp
src/backward.cpp
)
target_include_directories(masssprings PUBLIC ${RAYLIB_CPP_INCLUDE_DIR})
if(USE_TRACY)
target_link_libraries(masssprings PUBLIC raylib TracyClient)
target_link_libraries(masssprings PUBLIC raylib Backward::Backward TracyClient)
else()
target_link_libraries(masssprings PUBLIC raylib)
target_link_libraries(masssprings PUBLIC raylib Backward::Backward)
endif()
include(CheckIPOSupported)

View File

@ -128,7 +128,7 @@ rec {
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
nativeBuildInputs = with pkgs; [
# Languages:
# bintools
binutils
gcc
# C/C++:
@ -159,6 +159,8 @@ rec {
# octree # this one doesn't store center of mass per node - which I need :(
tracy-wayland
thread-pool
backward-cpp
libbfd
# llvmPackages.openmp # not required for compilation but for clangd to find the headers
# raylib-cpp
# tinyobjloader
@ -283,7 +285,7 @@ rec {
abbr -a debug "${buildDebug} && ./cmake-build-debug/masssprings"
abbr -a release "${buildRelease} && ./cmake-build-release/masssprings"
abbr -a rungdb "${buildDebug} && gdb --tui ./cmake-build-debug/masssprings"
abbr -a runtracy "tracy -a 127.0.0.1"
abbr -a runtracy "tracy -a 127.0.0.1 &; ${buildRelease} && sudo -E ./cmake-build-release/masssprings"
'';
in
builtins.concatStringsSep "\n" [