@ -10,7 +10,7 @@
include_guard ( )
include_guard ( )
set ( LY_PROJECTS " ${LY_PROJECTS} " CACHE STRING "List of projects to enable, this can be a relative path to the engine root or an absolute path" )
set ( LY_PROJECTS " " CACHE STRING "List of projects to enable, this can be a relative path to the engine root or an absolute path" )
# ! l y _ a d d _ t a r g e t _ d e p e n d e n c i e s : a d d s m o d u l e l o a d d e p e n d e n c i e s f o r t h i s t a r g e t .
# ! l y _ a d d _ t a r g e t _ d e p e n d e n c i e s : a d d s m o d u l e l o a d d e p e n d e n c i e s f o r t h i s t a r g e t .
#
#
@ -143,21 +143,25 @@ foreach(project ${LY_PROJECTS})
ly_generate_project_build_path_setreg ( ${ full_directory_path } )
ly_generate_project_build_path_setreg ( ${ full_directory_path } )
add_project_json_external_subdirectories ( ${ full_directory_path } )
add_project_json_external_subdirectories ( ${ full_directory_path } )
# G e t p r o j e c t n a m e
o3de_read_json_key ( project_name ${ full_directory_path } /project.json "project_name" )
# G e n e r a t e p a k f o r p r o j e c t i n r e l e a s e i n s t a l l s
# G e n e r a t e p a k f o r p r o j e c t i n r e l e a s e i n s t a l l s
cmake_path ( RELATIVE_PATH CMAKE_RUNTIME_OUTPUT_DIRECTORY BASE_DIRECTORY ${ CMAKE_BINARY_DIR } OUTPUT_VARIABLE runtime_output_directory )
cmake_path ( RELATIVE_PATH CMAKE_RUNTIME_OUTPUT_DIRECTORY BASE_DIRECTORY ${ CMAKE_BINARY_DIR } OUTPUT_VARIABLE install_base_ runtime_output_directory)
set ( install_engine_pak_template [=[
set ( install_engine_pak_template [=[
if ( "${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$" )
if ( "${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$" )
set ( install_output_folder "${CMAKE_INSTALL_PREFIX}/@runtime_output_directory@/@PAL_PLATFORM_NAME@/${CMAKE_INSTALL_CONFIG_NAME}/@LY_BUILD_PERMUTATION@" )
set ( install_output_folder "${CMAKE_INSTALL_PREFIX}/@install_base_runtime_output_directory@/@PAL_PLATFORM_NAME@/${CMAKE_INSTALL_CONFIG_NAME}/@LY_BUILD_PERMUTATION@" )
set ( install_pak_output_folder "${install_output_folder}/Cache/@LY_ASSET_DEPLOY_ASSET_TYPE@" )
if ( NOT DEFINED LY_ASSET_DEPLOY_ASSET_TYPE )
if ( NOT DEFINED LY_ASSET_DEPLOY_ASSET_TYPE )
set ( LY_ASSET_DEPLOY_ASSET_TYPE @LY_ASSET_DEPLOY_ASSET_TYPE@ )
set ( LY_ASSET_DEPLOY_ASSET_TYPE @LY_ASSET_DEPLOY_ASSET_TYPE@ )
endif ( )
endif ( )
message ( STATUS "Generating ${install_ output_folder}/engine.pak from @full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}")
message ( STATUS "Generating ${install_ pak_ output_folder}/engine.pak from @full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}")
file ( MAKE_DIRECTORY "${install_ output_folder}")
file ( MAKE_DIRECTORY "${install_ pak_ output_folder}")
cmake_path ( SET cache_product_path "@full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}" )
cmake_path ( SET cache_product_path "@full_directory_path@/Cache/${LY_ASSET_DEPLOY_ASSET_TYPE}" )
file ( GLOB product_assets "${cache_product_path}/*" )
file ( GLOB product_assets "${cache_product_path}/*" )
if ( product_assets )
if ( product_assets )
execute_process (
execute_process (
C O M M A N D $ { C M A K E _ C O M M A N D } - E t a r " c f " " $ { i n s t a l l _ ou t p u t _ f o l d e r } / e n g i n e . p a k " - - f o r m a t = z i p - - $ { p r o d u c t _ a s s e t s }
C O M M A N D $ { C M A K E _ C O M M A N D } - E t a r " c f " " $ { i n s t a l l _ pa k _ ou t p u t _ f o l d e r } / e n g i n e . p a k " - - f o r m a t = z i p - - $ { p r o d u c t _ a s s e t s }
W O R K I N G _ D I R E C T O R Y " $ { c a c h e _ p r o d u c t _ p a t h } "
W O R K I N G _ D I R E C T O R Y " $ { c a c h e _ p r o d u c t _ p a t h } "
R E S U L T _ V A R I A B L E a r c h i v e _ c r e a t i o n _ r e s u l t
R E S U L T _ V A R I A B L E a r c h i v e _ c r e a t i o n _ r e s u l t
)
)
@ -165,6 +169,10 @@ if("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
message ( STATUS "${install_output_folder}/engine.pak generated" )
message ( STATUS "${install_output_folder}/engine.pak generated" )
endif ( )
endif ( )
endif ( )
endif ( )
file ( WRITE ${ install_output_folder } /project.json
" {
\ " p r o j e c t _ n a m e \ " : \ " @ p r o j e c t _ n a m e @ \ "
} " )
endif ( )
endif ( )
] = ] )
] = ] )
string ( CONFIGURE "${install_engine_pak_template}" install_engine_pak_code @ONLY )
string ( CONFIGURE "${install_engine_pak_template}" install_engine_pak_code @ONLY )