Moves the inclusion of the platform-specific install files to the end of cmake/Install.cmake so the install wrapper functions are available

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-10-27 16:59:39 -07:00
parent b48073b171
commit c82f97c03c
+9 -5
View File
@@ -8,11 +8,6 @@
set(LY_INSTALL_ENABLED TRUE CACHE BOOL "Indicates if the install process is enabled")
if(LY_INSTALL_ENABLED)
ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME})
include(${pal_dir}/Install_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
endif()
#! ly_install: wrapper to install that handles common functionality
#
# \notes:
@@ -22,6 +17,10 @@ endif()
#
function(ly_install)
if(NOT LY_INSTALL_ENABLED)
return()
endif()
cmake_parse_arguments(ly_install "" "COMPONENT" "" ${ARGN})
if (NOT ly_install_COMPONENT OR "${ly_install_COMPONENT}" STREQUAL "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}")
# if it is installing under the default component, we need to de-duplicate since we can have
@@ -194,3 +193,8 @@ function(ly_install_run_script SCRIPT)
)
endfunction()
if(LY_INSTALL_ENABLED)
ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME})
include(${pal_dir}/Install_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
endif()