diff options
Diffstat (limited to 'indra/cmake/Tracy.cmake')
-rw-r--r-- | indra/cmake/Tracy.cmake | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/indra/cmake/Tracy.cmake b/indra/cmake/Tracy.cmake index a29d4021a3..0bf3bd85ff 100644 --- a/indra/cmake/Tracy.cmake +++ b/indra/cmake/Tracy.cmake @@ -1,32 +1,18 @@ # -*- cmake -*- include(Prebuilt) +include_guard() +add_library( ll::tracy INTERFACE IMPORTED ) + 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_system_binary(tracy) 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 "TracyClient") - endif (DARWIN) + target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy) - if (LINUX) - MESSAGE(STATUS "Including Tracy for Linux: '${TRACY_INCLUDE_DIR}'") - set(TRACY_LIBRARY "TracyClient") - 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 "") + # See: indra/llcommon/llprofiler.h + add_compile_definitions(LL_PROFILER_CONFIGURATION=3) endif (USE_TRACY) |