summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Bouvier <contact@amb.tf>2023-09-16 18:59:53 +0200
committerAlexandre Bouvier <contact@amb.tf>2023-09-18 18:35:20 +0200
commitf93f31f4ae6c8ab22182ae0fdf4eb613658e98f3 (patch)
tree1b95e0d8de1c3c2bd6c9ac9ce07ce914b6bec15e
parentMerge pull request #11258 from Squall-Leonhart/Z16_Assert_Fix (diff)
downloadyuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar.gz
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar.bz2
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar.lz
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar.xz
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.tar.zst
yuzu-f93f31f4ae6c8ab22182ae0fdf4eb613658e98f3.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt1
-rw-r--r--CMakeModules/FindRenderDoc.cmake19
-rw-r--r--externals/CMakeLists.txt7
-rw-r--r--src/core/CMakeLists.txt2
4 files changed, 26 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b0891adf..2bef9d6ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -333,6 +333,7 @@ find_package(LLVM 17 MODULE COMPONENTS Demangle)
find_package(lz4 REQUIRED)
find_package(nlohmann_json 3.8 REQUIRED)
find_package(Opus 1.3 MODULE)
+find_package(RenderDoc MODULE)
find_package(VulkanMemoryAllocator CONFIG)
find_package(ZLIB 1.2 REQUIRED)
find_package(zstd 1.5 REQUIRED)
diff --git a/CMakeModules/FindRenderDoc.cmake b/CMakeModules/FindRenderDoc.cmake
new file mode 100644
index 000000000..2678b936b
--- /dev/null
+++ b/CMakeModules/FindRenderDoc.cmake
@@ -0,0 +1,19 @@
+# SPDX-FileCopyrightText: 2023 Alexandre Bouvier <contact@amb.tf>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+find_path(RenderDoc_INCLUDE_DIR renderdoc_app.h)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(RenderDoc
+ REQUIRED_VARS RenderDoc_INCLUDE_DIR
+)
+
+if (RenderDoc_FOUND AND NOT TARGET RenderDoc::API)
+ add_library(RenderDoc::API INTERFACE IMPORTED)
+ set_target_properties(RenderDoc::API PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${RenderDoc_INCLUDE_DIR}"
+ )
+endif()
+
+mark_as_advanced(RenderDoc_INCLUDE_DIR)
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index a4c2ffc10..9eebc7d65 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -174,8 +174,11 @@ target_include_directories(stb PUBLIC ./stb)
add_library(bc_decoder bc_decoder/bc_decoder.cpp)
target_include_directories(bc_decoder PUBLIC ./bc_decoder)
-add_library(renderdoc INTERFACE)
-target_include_directories(renderdoc SYSTEM INTERFACE ./renderdoc)
+if (NOT TARGET RenderDoc::API)
+ add_library(renderdoc INTERFACE)
+ target_include_directories(renderdoc SYSTEM INTERFACE ./renderdoc)
+ add_library(RenderDoc::API ALIAS renderdoc)
+endif()
if (ANDROID)
if (ARCHITECTURE_arm64)
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b2dc71d4c..4e1f1f47a 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -890,7 +890,7 @@ endif()
create_target_directory_groups(core)
target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core nx_tzdb)
-target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls renderdoc)
+target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls RenderDoc::API)
if (MINGW)
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
endif()