Fixes install failures when RenderDoc and/or PIX are enabled
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -12,10 +12,12 @@
|
||||
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
|
||||
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
|
||||
|
||||
if(PAL_TRAIT_PROF_PIX_SUPPORTED AND LY_PIX_ENABLED)
|
||||
set(LY_PIX_PATH "${LY_3RDPARTY_PATH}/winpixeventruntime" CACHE PATH "Path to the Windows Pix Event Runtime.")
|
||||
set(AZ_CORE_PIX_BUILD_DEPENDENCIES 3rdParty::pix)
|
||||
set(AZ_CORE_PIX_BUILD_DEFINES "USE_PIX")
|
||||
if(PAL_TRAIT_PROF_PIX_SUPPORTED)
|
||||
set(LY_PIX_ENABLED OFF CACHE BOOL "Enables PIX profiler integration.")
|
||||
if(LY_PIX_ENABLED)
|
||||
message(STATUS "PIX found, enabling as profiler")
|
||||
set(AZ_CORE_PIX_BUILD_DEPENDENCIES 3rdParty::pix)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ly_add_target(
|
||||
@@ -41,9 +43,6 @@ ly_add_target(
|
||||
3rdParty::zstd
|
||||
3rdParty::cityhash
|
||||
${AZ_CORE_PIX_BUILD_DEPENDENCIES}
|
||||
COMPILE_DEFINITIONS
|
||||
PUBLIC
|
||||
${AZ_CORE_PIX_BUILD_DEFINES}
|
||||
)
|
||||
ly_add_source_properties(
|
||||
SOURCES
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
ly_add_external_target(
|
||||
NAME renderdoc
|
||||
3RDPARTY_ROOT_DIRECTORY "${LY_RENDERDOC_PATH}"
|
||||
VERSION
|
||||
INCLUDE_DIRECTORIES .
|
||||
COMPILE_DEFINITIONS USE_RENDER_DOC
|
||||
)
|
||||
+1
-2
@@ -6,5 +6,4 @@
|
||||
#
|
||||
#
|
||||
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_TEST FALSE)
|
||||
set(ATOM_RHI_TRAIT_BUILD_SUPPORTS_EDIT FALSE)
|
||||
set(RENDERDOC_RUNTIME_DEPENDENCIES "${BASE_PATH}/librenderdoc.so")
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# 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(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,19 +11,11 @@ ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Sourc
|
||||
|
||||
include(${pal_dir}/AtomRHITests_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
|
||||
set(LY_RENDERDOC_ENABLED OFF CACHE BOOL "Enable RenderDoc integration.")
|
||||
set(RENDERDOC_CMAKE ${CMAKE_CURRENT_SOURCE_DIR}/${pal_dir}/renderdoc_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
if(EXISTS ${RENDERDOC_CMAKE})
|
||||
include(${RENDERDOC_CMAKE})
|
||||
endif()
|
||||
|
||||
if(LY_RENDERDOC_ENABLED AND TARGET "3rdParty::renderdoc")
|
||||
message(STATUS "Renderdoc found, adding as runtime dependency")
|
||||
set(USE_RENDERDOC_DEFINE "USE_RENDERDOC")
|
||||
set(RENDERDOC_BUILD_DEPENDENCY "3rdParty::renderdoc")
|
||||
else()
|
||||
set(USE_RENDERDOC_DEFINE "")
|
||||
set(RENDERDOC_BUILD_DEPENDENCY "")
|
||||
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)
|
||||
set(RENDERDOC_DEPENDENCY 3rdParty::renderdoc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ly_add_target(
|
||||
@@ -62,10 +54,10 @@ ly_add_target(
|
||||
AZ::AzFramework
|
||||
Gem::Atom_RHI.Reflect
|
||||
PUBLIC
|
||||
${RENDERDOC_BUILD_DEPENDENCY}
|
||||
${RENDERDOC_DEPENDENCY}
|
||||
COMPILE_DEFINITIONS
|
||||
PUBLIC
|
||||
${USE_RENDERDOC_DEFINE}
|
||||
${RENDERDOC_DEFINE}
|
||||
)
|
||||
|
||||
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,29 +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(NOT LY_MONOLITHIC_GAME)
|
||||
if(DEFINED ENV{"ATOM_RENDERDOC_PATH"})
|
||||
set(RENDERDOC_PATH ENV{"ATOM_RENDERDOC_PATH"})
|
||||
endif()
|
||||
|
||||
if(RENDERDOC_PATH)
|
||||
# Normalize file path
|
||||
file(TO_CMAKE_PATH "${RENDERDOC_PATH}" RENDERDOC_PATH)
|
||||
|
||||
if(EXISTS "${RENDERDOC_PATH}/librenderdoc.so")
|
||||
ly_add_external_target(
|
||||
NAME renderdoc
|
||||
VERSION
|
||||
3RDPARTY_ROOT_DIRECTORY ${RENDERDOC_PATH}
|
||||
INCLUDE_DIRECTORIES "."
|
||||
RUNTIME_DEPENDENCIES "${RENDERDOC_PATH}/librenderdoc.so"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
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,31 +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(NOT LY_MONOLITHIC_GAME)
|
||||
# Common installation path for renderdoc path
|
||||
set(RENDERDOC_PATH "$ENV{PROGRAMFILES}/RenderDoc")
|
||||
if(DEFINED ENV{"ATOM_RENDERDOC_PATH"})
|
||||
set(RENDERDOC_PATH ENV{"ATOM_RENDERDOC_PATH"})
|
||||
endif()
|
||||
|
||||
if(RENDERDOC_PATH)
|
||||
# Normalize file path
|
||||
file(TO_CMAKE_PATH "${RENDERDOC_PATH}" RENDERDOC_PATH)
|
||||
|
||||
if(EXISTS "${RENDERDOC_PATH}/renderdoc.dll")
|
||||
ly_add_external_target(
|
||||
NAME renderdoc
|
||||
VERSION
|
||||
3RDPARTY_ROOT_DIRECTORY ${RENDERDOC_PATH}
|
||||
INCLUDE_DIRECTORIES "."
|
||||
RUNTIME_DEPENDENCIES "${RENDERDOC_PATH}/renderdoc.dll"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
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)
|
||||
|
||||
@@ -122,7 +122,13 @@ function(ly_add_external_target)
|
||||
set(BASE_PATH "${LY_3RDPARTY_PATH}/${ly_add_external_target_3RDPARTY_DIRECTORY}")
|
||||
|
||||
else()
|
||||
ly_install_external_target(${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY})
|
||||
# only install external 3rdParty that are within the source tree
|
||||
cmake_path(RELATIVE_PATH ly_add_external_target_3RDPARTY_ROOT_DIRECTORY
|
||||
BASE_DIRECTORY ${LY_ROOT_FOLDER}
|
||||
OUTPUT_VARIABLE relative_path)
|
||||
if(relative_path AND NOT relative_path MATCHES "^../")
|
||||
ly_install_external_target(${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY})
|
||||
endif()
|
||||
set(BASE_PATH "${ly_add_external_target_3RDPARTY_ROOT_DIRECTORY}")
|
||||
endif()
|
||||
|
||||
@@ -309,7 +315,7 @@ function(ly_install_external_target 3RDPARTY_ROOT_DIRECTORY)
|
||||
ly_install_files(FILES ${CMAKE_CURRENT_LIST_FILE}
|
||||
DESTINATION cmake/3rdParty
|
||||
)
|
||||
ly_install_directory(DIRECTORIES ${3RDPARTY_ROOT_DIRECTORY})
|
||||
ly_install_directory(DIRECTORIES "${3RDPARTY_ROOT_DIRECTORY}")
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
Vendored
+9
-10
@@ -6,14 +6,13 @@
|
||||
#
|
||||
#
|
||||
|
||||
if(LY_PIX_ENABLED)
|
||||
file(TO_CMAKE_PATH "${LY_PIX_PATH}" PIX_PATH)
|
||||
message(STATUS "PIX found: ${PIX_PATH}")
|
||||
set(LY_PIX_PATH "${LY_3RDPARTY_PATH}/winpixeventruntime" CACHE PATH "Path to the Windows Pix Event Runtime.")
|
||||
|
||||
ly_add_external_target(
|
||||
NAME pix
|
||||
3RDPARTY_ROOT_DIRECTORY ${LY_PIX_PATH}
|
||||
VERSION
|
||||
INCLUDE_DIRECTORIES Include
|
||||
COMPILE_DEFINITIONS USE_PIX
|
||||
)
|
||||
|
||||
ly_add_external_target(
|
||||
NAME pix
|
||||
3RDPARTY_ROOT_DIRECTORY "${PIX_PATH}"
|
||||
VERSION
|
||||
INCLUDE_DIRECTORIES include
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user