Change the default package target to use the chosen CMake configuration instead of Shipping.

This commit is contained in:
Marcel Pi 2024-12-12 11:07:34 +01:00 committed by Blyron
parent d1173878c8
commit a6d72f7cd4
2 changed files with 14 additions and 3 deletions

View File

@ -220,10 +220,21 @@ carla_string_option (
""
)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set (CARLA_UNREAL_BUILD_TYPE_DEFAULT Debug)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
set (CARLA_UNREAL_BUILD_TYPE_DEFAULT Development)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
set (CARLA_UNREAL_BUILD_TYPE_DEFAULT Shipping)
else ()
carla_warning("Unexpected CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\". Unreal builds will default to Development. Manually override CARLA_UNREAL_BUILD_TYPE if this behavior is not desired.")
set (CARLA_UNREAL_BUILD_TYPE_DEFAULT Development)
endif ()
carla_string_option (
CARLA_UNREAL_BUILD_TYPE
"Carla Unreal-style build type (Debug/Development/Shipping)."
"Development"
"Set the default Unreal build configuration."
"${CARLA_UNREAL_BUILD_TYPE_DEFAULT}"
)

View File

@ -503,7 +503,7 @@ endfunction()
# Docs for UE5 build configurations:
# https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/BuildConfigurations/
add_carla_ue_package_target("" Shipping)
add_carla_ue_package_target("" ${CARLA_UNREAL_BUILD_TYPE})
add_carla_ue_package_target(Shipping Shipping)
add_carla_ue_package_target(Debug Debug)
add_carla_ue_package_target(DebugGame DebugGame)