diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-07-10 00:14:44 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-07-10 00:14:44 +0200 |
| commit | 3ab87d5f729ff118e2b24e47f26582d9e1cc4aa2 (patch) | |
| tree | bed9493cc8c48d78950279ca6278e9e1da07d778 /src | |
| parent | cfcb5c3212f0fce667885ff0de6fa0b9fc4b3ca8 (diff) | |
Add tracy profiler
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ff5f034..3d3daeb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,13 +1,6 @@ add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES) -include_directories(${CMAKE_SOURCE_DIR}/include) -include_directories(${Vulkan_INCLUDE_DIRS}) - -if(UNIX AND NOT APPLE) - include_directories(${X11_xcb_INCLUDE_PATH}) -endif() - -set(LIBRARIES imgui::imgui nlohmann_json::nlohmann_json) +set(LIBRARIES imgui::imgui nlohmann_json::nlohmann_json Tracy::TracyClient) add_executable( path-tracer @@ -25,8 +18,17 @@ add_executable( gltf.cpp compute-renderpass.cpp primitive-renderpass.cpp + ${Tracy_SOURCE_DIR}/TracyClient.cpp ) +target_include_directories(path-tracer PUBLIC ${CMAKE_SOURCE_DIR}/include) +target_include_directories(path-tracer PUBLIC ${Vulkan_INCLUDE_DIRS}) + +if(UNIX AND NOT APPLE) + target_include_directories(path-tracer PUBLIC ${X11_xcb_INCLUDE_PATH}) +endif() + + if(UNIX AND NOT APPLE) list(APPEND LIBRARIES ${CMAKE_DL_LIBS} ${X11_xcb_LIB} ${X11_xkbcommon_LIB} ${X11_xkbcommon_X11_LIB}) endif() diff --git a/src/main.cpp b/src/main.cpp index f155a92..0b371ae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,8 @@ #include "vk-renderer.hpp" #include "window.hpp" +#include "Tracy.hpp" + #if defined(LINUX) #include <dlfcn.h> #include <unistd.h> |
