2021-12-21 00:43:09 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-01-14 02:49:26 +08:00
|
|
|
index 9fd34587..2a42c862 100644
|
2021-12-21 00:43:09 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -6,7 +6,9 @@ find_package(Threads REQUIRED)
|
|
|
|
|
|
|
|
add_library(TracyClient TracyClient.cpp)
|
|
|
|
target_compile_features(TracyClient PUBLIC cxx_std_11)
|
|
|
|
-target_include_directories(TracyClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
+target_include_directories(TracyClient PUBLIC
|
|
|
|
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
+ $<INSTALL_INTERFACE:include>)
|
|
|
|
target_link_libraries(
|
|
|
|
TracyClient
|
|
|
|
PUBLIC
|
2022-01-14 02:49:26 +08:00
|
|
|
@@ -43,3 +45,68 @@ set_option(TRACY_NO_FRAME_IMAGE "Disable capture of frame images" OFF)
|
2021-12-21 00:43:09 +08:00
|
|
|
set_option(TRACE_NO_SAMPLING "Disable call stack sampling" OFF)
|
|
|
|
set_option(TRACY_NO_VERIFY "Disable zone validation for C API" OFF)
|
|
|
|
set_option(TRACY_NO_VSYNC_CAPTURE "Disable capture of hardware Vsync events" OFF)
|
|
|
|
+
|
|
|
|
+if(BUILD_SHARED_LIBS)
|
|
|
|
+ target_compile_definitions(TracyClient PRIVATE TRACY_EXPORTS)
|
2022-01-14 02:49:26 +08:00
|
|
|
+ target_compile_definitions(TracyClient INTERFACE TRACY_IMPORTS)
|
2021-12-21 00:43:09 +08:00
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
+include(CMakePackageConfigHelpers)
|
|
|
|
+include(GNUInstallDirs)
|
|
|
|
+
|
|
|
|
+set(includes
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyC.h
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/Tracy.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyD3D11.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyD3D12.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyLua.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyOpenCL.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyOpenGL.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/TracyVulkan.hpp)
|
2022-01-14 02:49:26 +08:00
|
|
|
+set(client_includes
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/tracy_concurrentqueue.h
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/tracy_rpmalloc.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyArmCpuTable.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyCallstack.h
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyCallstack.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyDebug.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyDxt1.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyFastVector.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyLock.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyProfiler.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyRingBuffer.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyScoped.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracySysTime.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracySysTrace.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/client/TracyThread.hpp)
|
|
|
|
+set(common_includes
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/tracy_lz4.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/tracy_lz4hc.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyAlign.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyAlign.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyAlloc.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyApi.h
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyColor.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyForceInline.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyMutex.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyProtocol.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyQueue.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracySocket.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyStackFrames.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracySystem.hpp
|
|
|
|
+ ${CMAKE_CURRENT_LIST_DIR}/common/TracyYield.hpp)
|
2021-12-21 00:43:09 +08:00
|
|
|
+
|
|
|
|
+install(TARGETS TracyClient
|
|
|
|
+ EXPORT TracyConfig
|
|
|
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
+install(FILES ${includes}
|
|
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
2022-01-14 02:49:26 +08:00
|
|
|
+install(FILES ${client_includes}
|
|
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/client)
|
|
|
|
+install(FILES ${common_includes}
|
|
|
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/common)
|
2021-12-21 00:43:09 +08:00
|
|
|
+install(EXPORT TracyConfig
|
|
|
|
+ FILE TracyConfig.cmake
|
|
|
|
+ DESTINATION share/Tracy)
|