Skip to content

Commit 3390258

Browse files
committed
Add tracy profiler dependency using FetchContent
1 parent aa561ee commit 3390258

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

attachments/simple_engine/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cmake_minimum_required(VERSION 3.29)
22

3+
include(FetchContent)
4+
35
project(SimpleEngine VERSION 1.0.0 LANGUAGES CXX C)
46

57
# Option to enable/disable Vulkan C++20 module support for this standalone project
@@ -10,6 +12,17 @@ if(ENABLE_CPP20_MODULE)
1012
set(CMAKE_CXX_SCAN_FOR_MODULES ON)
1113
endif()
1214

15+
# Tracy profilfer
16+
option(TRACY_ENABLE "" ON)
17+
option(TRACY_ON_DEMAND "" ON)
18+
FetchContent_Declare(Tracy
19+
GIT_REPOSITORY https://github.com/wolfpld/tracy
20+
GIT_TAG v0.13.1
21+
GIT_SHALLOW ON
22+
EXCLUDE_FROM_ALL
23+
SYSTEM)
24+
FetchContent_MakeAvailable(Tracy)
25+
1326
# Add CMake module path for custom find modules
1427
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
1528

@@ -18,6 +31,7 @@ find_package (glm REQUIRED)
1831
find_package (Vulkan REQUIRED)
1932
find_package (tinygltf REQUIRED)
2033
find_package (KTX REQUIRED)
34+
find_package (Tracy REQUIRED)
2135

2236
# Find or download Vulkan-Hpp headers matching the Vulkan SDK/NDK version
2337
find_package(VulkanHpp REQUIRED)
@@ -189,6 +203,7 @@ target_link_libraries(SimpleEngine PUBLIC
189203
glm::glm
190204
tinygltf::tinygltf
191205
KTX::ktx
206+
TracyClient
192207
)
193208

194209
if (ANDROID)

0 commit comments

Comments
 (0)