diff --git a/cmake/Install.cmake b/cmake/Install.cmake index adcd28fa37..3b74e6c654 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -6,10 +6,7 @@ # # -ly_set(LY_INSTALL_ENABLED TRUE) -if(INSTALLED_ENGINE) - ly_set(LY_INSTALL_ENABLED FALSE) -endif() +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}) diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index d388b03b75..fb3d420c26 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -315,13 +315,16 @@ function(ly_add_target) # Store the target so we can walk through all of them in LocationDependencies.cmake set_property(GLOBAL APPEND PROPERTY LY_ALL_TARGETS ${interface_name}) - # Store the aliased target into a DIRECTORY property - set_property(DIRECTORY APPEND PROPERTY LY_DIRECTORY_TARGETS ${interface_name}) - # Store the directory path in a GLOBAL property so that it can be accessed - # in the layout install logic. Skip if the directory has already been added - get_property(ly_all_target_directories GLOBAL PROPERTY LY_ALL_TARGET_DIRECTORIES) - if(NOT CMAKE_CURRENT_SOURCE_DIR IN_LIST ly_all_target_directories) - set_property(GLOBAL APPEND PROPERTY LY_ALL_TARGET_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) + if(NOT ly_add_target_IMPORTED) + # Store the aliased target into a DIRECTORY property + set_property(DIRECTORY APPEND PROPERTY LY_DIRECTORY_TARGETS ${interface_name}) + + # Store the directory path in a GLOBAL property so that it can be accessed + # in the layout install logic. Skip if the directory has already been added + get_property(ly_all_target_directories GLOBAL PROPERTY LY_ALL_TARGET_DIRECTORIES) + if(NOT CMAKE_CURRENT_SOURCE_DIR IN_LIST ly_all_target_directories) + set_property(GLOBAL APPEND PROPERTY LY_ALL_TARGET_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) + endif() endif() # Custom commands need to be declared in the same folder as the target that they use. diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index 8fb2effe29..c453fadd2e 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -385,7 +385,6 @@ function(ly_setup_cmake_install) COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} PATTERN "__pycache__" EXCLUDE PATTERN "Findo3de.cmake" EXCLUDE - PATTERN "ConfigurationTypes.cmake" EXCLUDE REGEX "3rdParty/Platform\/.*\/BuiltInPackages_.*\.cmake" EXCLUDE ) # Connect configuration types