Skip to content

Instantly share code, notes, and snippets.

@pollend
Created August 2, 2026 18:36
Show Gist options
  • Select an option

  • Save pollend/4c49c11c835486807a83c2dedf196ed0 to your computer and use it in GitHub Desktop.

Select an option

Save pollend/4c49c11c835486807a83c2dedf196ed0 to your computer and use it in GitHub Desktop.
if(TRACY_ENABLE)
add_compile_definitions(TRACY_IMPORTS)
add_subdirectory(tracy)
if(WIN32)
# Windows has no RPATH equivalent; the loader only searches the exe
# directory for statically-imported DLLs. warfork/wf_server/wftv_server
# link Tracy at load time, so the DLL must sit beside them.
qf_set_output_dir(TracyClient "")
else()
qf_set_output_dir(TracyClient libs)
endif()
else()
# No profiler: the TracyC.h zone macros compile to nothing, so consumers only
# need the header path. Building the real client would emit an empty
# libTracyClient that every target still names on its link line.
add_library(TracyClient INTERFACE)
target_include_directories(TracyClient SYSTEM INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/tracy/public)
add_library(Tracy::TracyClient ALIAS TracyClient)
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment