aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
-rw-r--r--src/CMakeLists.txt18
-rw-r--r--src/main.cpp2
-rw-r--r--vcpkg.json3
4 files changed, 28 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ccc798f..50bc8d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,23 +28,25 @@ endif()
find_package(imgui CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(Vulkan REQUIRED)
+find_package(Tracy CONFIG REQUIRED)
+find_package(Threads REQUIRED)
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
endif()
-find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
-if (CMAKE_CXX_CPPCHECK)
- file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/cppcheck)
-
- list(
- APPEND CMAKE_CXX_CPPCHECK
- "--project=${CMAKE_BINARY_DIR}/compile_commands.json"
- "--cppcheck-build-dir=${CMAKE_BINARY_DIR}/cppcheck"
- "--enable=all"
- "-iinclude/thirdparty"
- )
-endif()
+# find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
+# if (CMAKE_CXX_CPPCHECK)
+# file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/cppcheck)
+#
+# list(
+# APPEND CMAKE_CXX_CPPCHECK
+# "--project=${CMAKE_BINARY_DIR}/compile_commands.json"
+# "--cppcheck-build-dir=${CMAKE_BINARY_DIR}/cppcheck"
+# "--enable=all"
+# "-iinclude/thirdparty"
+# )
+# endif()
add_subdirectory(src)
add_subdirectory(shaders)
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>
diff --git a/vcpkg.json b/vcpkg.json
index 712cb6f..bfe48b9 100644
--- a/vcpkg.json
+++ b/vcpkg.json
@@ -3,6 +3,7 @@
"version-string": "0.0.1",
"dependencies": [
"imgui",
- "nlohmann-json"
+ "nlohmann-json",
+ "tracy"
]
}