2022-05-03 18:53:24 +02:00
|
|
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
if(NOT EMSCRIPTEN)
|
|
|
|
add_library(tracy_client
|
2022-10-27 16:36:40 +02:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/tracy/public/tracy/Tracy.hpp"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/tracy/public/tracy/TracyLua.hpp"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/tracy/public/tracy/TracyVulkan.hpp"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/tracy/public/tracy/TracyOpenGL.hpp"
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-10-27 16:36:40 +02:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/tracy/public/TracyClient.cpp"
|
2022-04-16 20:33:35 +02:00
|
|
|
)
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2023-03-05 00:11:16 +01:00
|
|
|
option(TRACY_ENABLE "Enable tracy profiling" OFF)
|
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
if(TRACY_ENABLE)
|
|
|
|
target_compile_definitions(tracy_client PUBLIC TRACY_ENABLE)
|
|
|
|
#target_compile_definitions(tracy_client PUBLIC TRACY_NO_SYSTEM_TRACING)
|
|
|
|
message("Enabled TRACY")
|
|
|
|
endif()
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
target_compile_features(tracy_client PUBLIC cxx_std_17)
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-10-27 16:36:40 +02:00
|
|
|
target_include_directories(tracy_client PUBLIC "${CMAKE_CURRENT_LIST_DIR}/tracy/public")
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
if(UNIX)
|
|
|
|
target_link_libraries(tracy_client dl)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(tracy_client ws2_32 dbghelp)
|
|
|
|
endif()
|
|
|
|
else() # EMSCRIPTEN
|
|
|
|
add_library(tracy_client INTERFACE)
|
2020-09-29 13:47:50 +02:00
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
target_compile_features(tracy_client INTERFACE cxx_std_17)
|
|
|
|
|
2022-10-30 16:21:31 +01:00
|
|
|
target_include_directories(tracy_client INTERFACE "${CMAKE_CURRENT_LIST_DIR}/tracy/public")
|
2021-11-30 19:50:40 +01:00
|
|
|
endif()
|
|
|
|
|
2022-04-16 20:33:35 +02:00
|
|
|
|