WIP checkpoint

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-17 12:36:09 -07:00
parent a8908a987a
commit 99a009bb77
7 changed files with 101 additions and 67 deletions
-3
View File
@@ -81,9 +81,6 @@
#include AZ_RESTRICTED_FILE(ProjectDefines_h)
#else
#define PROJECTDEFINES_H_TRAIT_DISABLE_MONOLITHIC_PROFILING_MARKERS 1
#if !defined(LINUX) && !defined(APPLE)
#define PROJECTDEFINES_H_TRAIT_ENABLE_SOFTCODE_SYSTEM 1
#endif
#if defined(WIN32) || defined(WIN64) || defined(LINUX) || defined(APPLE)
#define PROJECTDEFINES_H_TRAIT_USE_GPU_PARTICLES 1
#endif
-3
View File
@@ -71,7 +71,6 @@ void InitCRTHandlers()
void InitCRTHandlers() {}
#endif
#ifndef SOFTCODE
//////////////////////////////////////////////////////////////////////////
// This is an entry to DLL initialization function that must be called for each loaded module
//////////////////////////////////////////////////////////////////////////
@@ -136,8 +135,6 @@ void* GetDetachEnvironmentSymbol()
return reinterpret_cast<void*>(&DetachEnvironment);
}
#endif // !defined(SOFTCODE)
bool g_bProfilerEnabled = false;
//////////////////////////////////////////////////////////////////////////
+55 -34
View File
@@ -89,37 +89,42 @@ endif()
set(_cmake_package_dest ${CPACK_BINARY_DIR}/${CPACK_CMAKE_PACKAGE_FILE})
string(REPLACE "." ";" _version_componets "${CPACK_DESIRED_CMAKE_VERSION}")
list(GET _version_componets 0 _major_version)
list(GET _version_componets 1 _minor_version)
set(_url_version_tag "v${_major_version}.${_minor_version}")
set(_package_url "https://cmake.org/files/${_url_version_tag}/${CPACK_CMAKE_PACKAGE_FILE}")
message(STATUS "Downloading CMake ${CPACK_DESIRED_CMAKE_VERSION} for packaging...")
download_file(
URL ${_package_url}
TARGET_FILE ${_cmake_package_dest}
EXPECTED_HASH ${CPACK_CMAKE_PACKAGE_HASH}
RESULTS _results
)
list(GET _results 0 _status_code)
if (${_status_code} EQUAL 0 AND EXISTS ${_cmake_package_dest})
message(STATUS "Package found and verified!")
if(EXISTS ${_cmake_package_dest})
message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found")
else()
file(REMOVE ${_cmake_package_dest})
list(REMOVE_AT _results 0)
# download it
string(REPLACE "." ";" _version_componets "${CPACK_DESIRED_CMAKE_VERSION}")
list(GET _version_componets 0 _major_version)
list(GET _version_componets 1 _minor_version)
set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}")
set(_url_version_tag "v${_major_version}.${_minor_version}")
set(_package_url "https://cmake.org/files/${_url_version_tag}/${CPACK_CMAKE_PACKAGE_FILE}")
if(${_status_code} EQUAL 1)
string(APPEND _error_message
" Please double check the CPACK_CMAKE_PACKAGE_FILE and "
"CPACK_CMAKE_PACKAGE_HASH properties before trying again.")
message(STATUS "Downloading CMake ${CPACK_DESIRED_CMAKE_VERSION} for packaging...")
download_file(
URL ${_package_url}
TARGET_FILE ${_cmake_package_dest}
EXPECTED_HASH ${CPACK_CMAKE_PACKAGE_HASH}
RESULTS _results
)
list(GET _results 0 _status_code)
if (${_status_code} EQUAL 0 AND EXISTS ${_cmake_package_dest})
message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found")
else()
file(REMOVE ${_cmake_package_dest})
list(REMOVE_AT _results 0)
set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}")
if(${_status_code} EQUAL 1)
string(APPEND _error_message
" Please double check the CPACK_CMAKE_PACKAGE_FILE and "
"CPACK_CMAKE_PACKAGE_HASH properties before trying again.")
endif()
message(FATAL_ERROR ${_error_message})
endif()
message(FATAL_ERROR ${_error_message})
endif()
install(FILES ${_cmake_package_dest}
@@ -192,17 +197,19 @@ include(CPack REQUIRED)
function(ly_configure_cpack_component ly_configure_cpack_component_NAME)
set(options REQUIRED)
set(oneValueArgs DISPLAY_NAME DESCRIPTION LICENSE_NAME LICENSE_FILE)
set(options REQUIRED DISABLED)
set(oneValueArgs DISPLAY_NAME DESCRIPTION LICENSE_NAME LICENSE_FILE DEPENDS)
set(multiValueArgs)
cmake_parse_arguments(ly_configure_cpack_component "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# default to optional
set(component_type DISABLED)
unset(component_type)
if(ly_configure_cpack_component_DISABLED)
list(APPEND component_type DISABLED)
endif()
if(ly_configure_cpack_component_REQUIRED)
set(component_type REQUIRED)
list(APPEND component_type REQUIRED)
endif()
set(license_name ${DEFAULT_LICENSE_NAME})
@@ -225,9 +232,23 @@ endfunction()
# configure ALL components here
ly_configure_cpack_component(
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} REQUIRED
DISPLAY_NAME "${PROJECT_NAME} Core"
DESCRIPTION "${PROJECT_NAME} Headers, Libraries and Tools"
DISPLAY_NAME "${PROJECT_NAME}"
DESCRIPTION "${PROJECT_NAME} Headers, scripts and common files"
)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
unset(flags)
if(${conf} STREQUAL profile)
set(flags REQUIRED)
else()
set(flags DISABLED)
endif()
ly_configure_cpack_component(
${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF} ${flags}
DISPLAY_NAME "${PROJECT_NAME} (${conf})"
DESCRIPTION "${PROJECT_NAME} Libraries and Tools in ${conf}"
)
endforeach()
if(LY_INSTALLER_DOWNLOAD_URL)
strip_trailing_slash(${LY_INSTALLER_DOWNLOAD_URL} LY_INSTALLER_DOWNLOAD_URL)
+33 -18
View File
@@ -105,18 +105,24 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
RUNTIME_SUBDIR ${target_runtime_output_subdirectory}
)
else()
install(
TARGETS ${TARGET_NAME}
ARCHIVE
DESTINATION ${archive_output_directory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
LIBRARY
DESTINATION ${library_output_directory}/${target_library_output_subdirectory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
RUNTIME
DESTINATION ${runtime_output_directory}/${target_runtime_output_subdirectory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
install(
TARGETS ${TARGET_NAME}
ARCHIVE
DESTINATION ${archive_output_directory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF}
CONFIGURATIONS ${conf}
LIBRARY
DESTINATION ${library_output_directory}/${target_library_output_subdirectory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF}
CONFIGURATIONS ${conf}
RUNTIME
DESTINATION ${runtime_output_directory}/${target_runtime_output_subdirectory}
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF}
CONFIGURATIONS ${conf}
)
endforeach()
endif()
# CMakeLists.txt related files
@@ -499,12 +505,15 @@ function(ly_setup_runtime_dependencies)
if(COMMAND ly_install_code_function_override)
ly_install_code_function_override()
else()
install(CODE
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
install(CODE
"function(ly_copy source_file target_directory)
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
endfunction()"
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
)
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF}
)
endforeach()
endif()
unset(runtime_commands)
@@ -543,9 +552,15 @@ endfunction()"
list(REMOVE_DUPLICATES runtime_commands)
list(JOIN runtime_commands " " runtime_commands_str) # the spaces are just to see the right identation in the cmake_install.cmake file
install(CODE "${runtime_commands_str}"
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)
install(CODE
"if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^(${conf})\$\")
${runtime_commands_str}
endif()"
COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}_${UCONF}
)
endforeach()
endfunction()
@@ -21,7 +21,7 @@
<Page Name="Install">
<Text X="38" Y="142" Width="-42" Height="34" FontId="0" DisablePrefix="yes">#(loc.InstallHeader)</Text>
@WIX_THEME_INSTALL_LICENSE_ELEMENTS@
<!--@WIX_THEME_INSTALL_LICENSE_ELEMENTS@-->
<Text X="0" Y="426" Width="672" Height="46" FontId="3" HideWhenDisabled="yes" />
<Button Name="OptionsButton" X="-190" Y="-10" Width="80" Height="24" TabStop="yes" FontId="2" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
@@ -33,11 +33,14 @@
<Page Name="Options">
<Text X="38" Y="142" Width="-42" Height="34" FontId="0" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
<Text X="42" Y="202" Width="-42" Height="18" FontId="1" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
<Editbox Name="FolderEditbox" X="42" Y="231" Width="354" Height="21" TabStop="yes" FontId="1" FileSystemAutoComplete="yes" />
<Button Name="BrowseButton" X="406" Y="230" Width="80" Height="23" TabStop="yes" FontId="1">#(loc.OptionsBrowseButton)</Button>
<Text X="42" Y="262" Width="-42" Height="20" FontId="4" DisablePrefix="yes">#(loc.OptionsWarningTitle)</Text>
<Text X="42" Y="282" Width="-42" Height="54" FontId="1" DisablePrefix="yes">#(loc.OptionsWarning)</Text>
<Checkbox Name="DebugSDK" X="42" Y="190" Width="-42" Height="20">Include debug SDK</Checkbox>
<Checkbox Name="DebugSDK" X="42" Y="210" Width="-42" Height="20">Include release monolithic SDK</Checkbox>
<Text X="42" Y="240" Width="-42" Height="18" FontId="1" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
<Editbox Name="FolderEditbox" X="42" Y="260" Width="354" Height="21" TabStop="yes" FontId="1" FileSystemAutoComplete="yes" />
<Button Name="BrowseButton" X="406" Y="260" Width="80" Height="23" TabStop="yes" FontId="1">#(loc.OptionsBrowseButton)</Button>
<Text X="42" Y="285" Width="-42" Height="20" FontId="4" DisablePrefix="yes">#(loc.OptionsWarningTitle)</Text>
<Text X="42" Y="310" Width="-42" Height="54" FontId="1" DisablePrefix="yes">#(loc.OptionsWarning)</Text>
<Text X="0" Y="426" Width="672" Height="46" FontId="3" HideWhenDisabled="yes" />
<Button Name="OptionsOkButton" X="-106" Y="-10" Width="80" Height="24" TabStop="yes" FontId="2">#(loc.OptionsOkButton)</Button>
@@ -23,6 +23,7 @@ set(CPACK_WIX_ROOT ${LY_INSTALLER_WIX_ROOT})
set(CPACK_GENERATOR WIX)
set(CPACK_THREADS 0)
set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-windows-x86_64")
set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.zip")
set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103eef2b071be3112")
@@ -30,8 +31,8 @@ set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103
# workaround for shortening the path cpack installs to by stripping the platform directory and forcing monolithic
# mode to strip out component folders. this unfortunately is the closest we can get to changing the install location
# as CPACK_PACKAGING_INSTALL_PREFIX/CPACK_SET_DESTDIR isn't supported for the WiX generator
set(CPACK_TOPLEVEL_TAG "")
set(CPACK_MONOLITHIC_INSTALL ON)
#set(CPACK_TOPLEVEL_TAG "")
#set(CPACK_MONOLITHIC_INSTALL ON)
# CPack will generate the WiX product/upgrade GUIDs further down the chain if they weren't supplied
# however, they are unique for each run. instead, let's do the auto generation here and add it to
+1 -1
View File
@@ -10,7 +10,7 @@
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")
#! ly_add_target_dependencies: adds module load dependencies for this target.
#