summaryrefslogtreecommitdiff
path: root/indra/cmake/Tracy.cmake
blob: 2cc9576ea1e787b6b70c406015d0829b2b8da529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- cmake -*-
include(Prebuilt)

set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.")

if (USE_TRACY)
  set(TRACY_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tracy) 

# See: indra/llcommon/llprofiler.h
  add_definitions(-DLL_PROFILER_CONFIGURATION=3)
  use_prebuilt_binary(tracy)

  if (WINDOWS)
    MESSAGE(STATUS "Including Tracy for Windows: '${TRACY_INCLUDE_DIR}'")
    set(TRACY_LIBRARY "TracyClient")
  endif (WINDOWS)

  if (DARWIN)
    MESSAGE(STATUS "Including Tracy for Darwin: '${TRACY_INCLUDE_DIR}'")
    set(TRACY_LIBRARY "tracy")
  endif (DARWIN)

  if (LINUX)
    MESSAGE(STATUS "Including Tracy for Linux: '${TRACY_INCLUDE_DIR}'")
  endif (LINUX)
else (USE_TRACY)
  # Tracy.cmake should not set LLCOMMON_INCLUDE_DIRS, let LLCommon.cmake do that
  set(TRACY_INCLUDE_DIR "")
  set(TRACY_LIBRARY "")
endif (USE_TRACY)