Find file for renderdoc and better wiring
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
+7
-1
@@ -6,4 +6,10 @@
|
||||
#
|
||||
#
|
||||
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
ly_add_external_target(
|
||||
NAME renderdoc
|
||||
3RDPARTY_ROOT_DIRECTORY "${LY_RENDERDOC_PATH}"
|
||||
VERSION
|
||||
INCLUDE_DIRECTORIES .
|
||||
COMPILE_DEFINITIONS USE_RENDER_DOC
|
||||
)
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
#
|
||||
#
|
||||
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
set(RENDERDOC_RUNTIME_DEPENDENCIES "${BASE_PATH}/librenderdoc.so")
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
#
|
||||
#
|
||||
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
set(RENDERDOC_RUNTIME_DEPENDENCIES "${BASE_PATH}/renderdoc.dll")
|
||||
@@ -6,6 +6,8 @@
|
||||
#
|
||||
#
|
||||
|
||||
ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty)
|
||||
|
||||
add_subdirectory(Code)
|
||||
add_subdirectory(DX12)
|
||||
add_subdirectory(Metal)
|
||||
|
||||
@@ -11,15 +11,10 @@ ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Sourc
|
||||
|
||||
include(${pal_dir}/AtomRHITests_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/${pal_dir}/renderdoc_support_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
if(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED)
|
||||
set(LY_RENDERDOC_ENABLED OFF CACHE BOOL "Enable RenderDoc integration. Use LY_RENDERDOC_PATH to specific the path to RenderDoc.")
|
||||
if(LY_RENDERDOC_ENABLED)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/${pal_dir}/renderdoc_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
if(PAL_TRAIT_BUILD_RENDERDOC_ENABLED)
|
||||
message(STATUS "Renderdoc found, adding as runtime dependency")
|
||||
set(RENDERDOC_DEFINE USE_RENDERDOC)
|
||||
endif()
|
||||
set(RENDERDOC_DEPENDENCY 3rdParty::renderdoc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -58,11 +53,11 @@ ly_add_target(
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Gem::Atom_RHI.Reflect
|
||||
PUBLIC
|
||||
${RENDERDOC_DEPENDENCY}
|
||||
COMPILE_DEFINITIONS
|
||||
PUBLIC
|
||||
${RENDERDOC_DEFINE}
|
||||
RUNTIME_DEPENDENCIES
|
||||
${RENDERDOC_RUNTIME_DEPENDENCIES}
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST FALSE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT FALSE)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
|
||||
@@ -8,3 +8,9 @@
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST FALSE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT TRUE)
|
||||
if(LY_MONOLITHIC_GAME)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
else()
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED TRUE)
|
||||
endif()
|
||||
set(LY_RENDERDOC_PATH "/usr/local" CACHE PATH "Path to RenderDoc.")
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_ENABLED FALSE)
|
||||
set(LY_RENDERDOC_PATH "/usr/local" CACHE PATH "Path to RenderDoc.")
|
||||
|
||||
# Normalize file path
|
||||
file(TO_CMAKE_PATH "${LY_RENDERDOC_PATH}" LY_RENDERDOC_PATH)
|
||||
|
||||
if(EXISTS "${LY_RENDERDOC_PATH}/librenderdoc.so")
|
||||
set(RENDERDOC_RUNTIME_DEPENDENCIES "${RENDERDOC_PATH}/librenderdoc.so")
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_ENABLED TRUE)
|
||||
endif()
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
# Prevent bundling the renderdoc dll with a packaged title
|
||||
if(LY_MONOLITHIC_GAME)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
else()
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED TRUE)
|
||||
endif()
|
||||
@@ -8,3 +8,4 @@
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST TRUE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT TRUE)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
|
||||
@@ -8,3 +8,9 @@
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST TRUE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT TRUE)
|
||||
if(LY_MONOLITHIC_GAME)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
else()
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED TRUE)
|
||||
endif()
|
||||
set(LY_RENDERDOC_PATH "$ENV{PROGRAMFILES}/RenderDoc" CACHE PATH "Path to RenderDoc.")
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
# Prevent bundling the renderdoc dll with a packaged title
|
||||
if(LY_MONOLITHIC_GAME)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
else()
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED TRUE)
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_ENABLED FALSE)
|
||||
set(LY_RENDERDOC_PATH "$ENV{PROGRAMFILES}/RenderDoc" CACHE PATH "Path to RenderDoc.")
|
||||
|
||||
# Normalize file path
|
||||
file(TO_CMAKE_PATH "${LY_RENDERDOC_PATH}" LY_RENDERDOC_PATH)
|
||||
|
||||
if(EXISTS "${LY_RENDERDOC_PATH}/renderdoc.dll")
|
||||
set(RENDERDOC_RUNTIME_DEPENDENCIES "${RENDERDOC_PATH}/renderdoc.dll")
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_ENABLED TRUE)
|
||||
endif()
|
||||
@@ -8,3 +8,4 @@
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST FALSE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT FALSE)
|
||||
set(PAL_TRAIT_BUILD_RENDERDOC_SUPPORTED FALSE)
|
||||
|
||||
Reference in New Issue
Block a user