diff --git a/CMake/CarlaOptions.cmake b/CMake/CarlaOptions.cmake index a001426f8..6bb5ed422 100644 --- a/CMake/CarlaOptions.cmake +++ b/CMake/CarlaOptions.cmake @@ -257,11 +257,11 @@ carla_string_option ( carla_string_option ( CARLA_STREETMAP_VERSION "Target StreetMap version." - UE5Native + ue5.3 ) carla_string_option ( CARLA_STREETMAP_TAG "Target StreetMap git tag." - ${CARLA_LIBOSMSCOUT_VERSION} + ${CARLA_STREETMAP_VERSION} ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36c9e7f12..1815701af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,13 +114,3 @@ endif () if (BUILD_CARLA_UE) add_subdirectory (Unreal) endif () - -carla_two_step_configure_file ( - ${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Carla.Build.cs - ${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Carla.Build.cs.in -) - -carla_two_step_configure_file ( - ${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal/Plugins/CarlaTools/Source/CarlaTools/CarlaTools.Build.cs - ${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal/Plugins/CarlaTools/Source/CarlaTools/CarlaTools.Build.cs.in -) diff --git a/Makefile b/Makefile index 2a20f7365..789e9446b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -launch PythonAPI LibCarla CarlaUE4Editor CarlaUnrealEditor launch-only: +launch PythonAPI LibCarla CarlaUnrealEditor CarlaUnrealEditor launch-only: @echo "MakeFile build is currently disabled." # include Util/BuildTools/Vars.mk diff --git a/PythonAPI/CMakeLists.txt b/PythonAPI/CMakeLists.txt index b2bf4bca6..8012af050 100644 --- a/PythonAPI/CMakeLists.txt +++ b/PythonAPI/CMakeLists.txt @@ -81,7 +81,6 @@ target_compile_definitions ( ${CARLA_COMMON_DEFINITIONS} ${CARLA_RTTI_DEFINITIONS} BOOST_ALL_NO_LIB - BOOST_PYTHON_STATIC_LINK LIBCARLA_WITH_PYTHON_SUPPORT ) @@ -101,6 +100,8 @@ endif () add_custom_target ( carla-python-api-symlink ALL + COMMENT + "Creating CARLA PythonAPI .PYD/.SO symlink..." COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${PYTHON_API_PATH}/examples/carla${PYD_EXT} ) diff --git a/Unreal/CMakeLists.txt b/Unreal/CMakeLists.txt index 0be649fd9..3e1d8a472 100644 --- a/Unreal/CMakeLists.txt +++ b/Unreal/CMakeLists.txt @@ -19,34 +19,55 @@ set ( ${CARLA_WORKSPACE_PATH}/Unreal/CarlaUnreal ) +set ( + CARLA_UE_PLUGINS_PATH + ${CARLA_UE_PATH}/Plugins +) + set ( CARLA_UE_PROJECT_PATH ${CARLA_UE_PATH}/CarlaUnreal.uproject ) -execute_process ( +carla_two_step_configure_file ( + ${CARLA_UE_PLUGINS_PATH}/Carla/Source/Carla/Carla.Build.cs + ${CARLA_UE_PLUGINS_PATH}/Carla/Source/Carla/Carla.Build.cs.in +) + +carla_two_step_configure_file ( + ${CARLA_UE_PLUGINS_PATH}/CarlaTools/Source/CarlaTools/CarlaTools.Build.cs + ${CARLA_UE_PLUGINS_PATH}/CarlaTools/Source/CarlaTools/CarlaTools.Build.cs.in +) + +add_custom_target ( + carla-ue-generate-project-files + ALL + COMMENT + "Generating UE project files for CARLA..." COMMAND ${CARLA_UE_GENERATE_PROJECT_SCRIPT} -project=${CARLA_UE_PROJECT_PATH} -game -engine - -makefiles - RESULT_VARIABLE - GENERATE_RPJECT_FILES_RESULT + -CMakefile ) -if (NOT ${GENERATE_RPJECT_FILES_RESULT}) - message ( - FATAL_ERROR - "Could not generate Unreal Engine project files." - ) -endif () +add_custom_target ( + carla-ue-build + ALL + DEPENDS + carla-ue-generate-project-files + COMMENT + "Building CARLA UE..." + COMMAND + ${CMAKE_COMMAND} + -S ${CARLA_UE_PATH} + -B ${CMAKE_CURRENT_BINARY_DIR} + -G ${CMAKE_GENERATOR} + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +) file ( MAKE_DIRECTORY ${CARLA_UE_PATH}/Content/Carla/ExportedMaps -) - -add_subdirectory ( - CarlaUnreal ) \ No newline at end of file diff --git a/Unreal/CarlaUnreal/.gitignore b/Unreal/CarlaUnreal/.gitignore index c89859c25..84318b7a7 100644 --- a/Unreal/CarlaUnreal/.gitignore +++ b/Unreal/CarlaUnreal/.gitignore @@ -21,5 +21,6 @@ Config/CarSimConfig.ini *.code-workspace .idea .vscode +.ignore CMakeLists.txt Makefile diff --git a/Unreal/CarlaUnreal/CarlaUE4.png b/Unreal/CarlaUnreal/CarlaUnreal.png similarity index 100% rename from Unreal/CarlaUnreal/CarlaUE4.png rename to Unreal/CarlaUnreal/CarlaUnreal.png diff --git a/Unreal/CarlaUnreal/CarlaUE4.uproject b/Unreal/CarlaUnreal/CarlaUnreal.uproject similarity index 100% rename from Unreal/CarlaUnreal/CarlaUE4.uproject rename to Unreal/CarlaUnreal/CarlaUnreal.uproject diff --git a/Unreal/CarlaUnreal/Plugins/CarlaTools/Content/Python/generate_tile.py b/Unreal/CarlaUnreal/Plugins/CarlaTools/Content/Python/generate_tile.py index e68a03b11..e24c77534 100644 --- a/Unreal/CarlaUnreal/Plugins/CarlaTools/Content/Python/generate_tile.py +++ b/Unreal/CarlaUnreal/Plugins/CarlaTools/Content/Python/generate_tile.py @@ -8,7 +8,7 @@ import subprocess """Generic function for running a commandlet with its arguments.""" ue4_path = os.environ["UE4_ROOT"] -uproject_path = unreal.Paths.project_dir() + ("CarlaUE4.uproject") +uproject_path = unreal.Paths.project_dir() + ("CarlaUnreal.uproject") run = "-run=%s" % ("GenerateTileCommandlet") print("Before any Commandlet:") diff --git a/Unreal/CarlaUnreal/Source/CarlaUnreal.Target.cs b/Unreal/CarlaUnreal/Source/CarlaUnreal.Target.cs index 7d88f0427..e7687e1f9 100644 --- a/Unreal/CarlaUnreal/Source/CarlaUnreal.Target.cs +++ b/Unreal/CarlaUnreal/Source/CarlaUnreal.Target.cs @@ -4,7 +4,7 @@ using UnrealBuildTool; using System; using EpicGames.Core; -public class CarlaUE4Target : TargetRules +public class CarlaUnrealTarget : TargetRules { [CommandLine("-unity-build")] bool EnableUnityBuild = true; @@ -15,7 +15,7 @@ public class CarlaUE4Target : TargetRules Console.WriteLine(string.Format("{0} is {1}.", name, state)); } - public CarlaUE4Target(TargetInfo Target) : + public CarlaUnrealTarget(TargetInfo Target) : base(Target) { DefaultBuildSettings = BuildSettingsVersion.Latest; diff --git a/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.Build.cs b/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.Build.cs similarity index 100% rename from Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.Build.cs rename to Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.Build.cs diff --git a/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.cpp b/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.cpp similarity index 100% rename from Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.cpp rename to Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.cpp diff --git a/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.h b/Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.h similarity index 100% rename from Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUE4.h rename to Unreal/CarlaUnreal/Source/CarlaUnreal/CarlaUnreal.h diff --git a/Unreal/CarlaUnreal/Source/CarlaUnrealEditor.Target.cs b/Unreal/CarlaUnreal/Source/CarlaUnrealEditor.Target.cs index 46dce32c5..9b8d7d1b1 100644 --- a/Unreal/CarlaUnreal/Source/CarlaUnrealEditor.Target.cs +++ b/Unreal/CarlaUnreal/Source/CarlaUnrealEditor.Target.cs @@ -4,7 +4,7 @@ using UnrealBuildTool; using System; using EpicGames.Core; -public class CarlaUE4EditorTarget : TargetRules +public class CarlaUnrealEditorTarget : TargetRules { [CommandLine("-unity-build")] bool EnableUnityBuild = true; @@ -15,7 +15,7 @@ public class CarlaUE4EditorTarget : TargetRules Console.WriteLine(string.Format("{0} is {1}.", name, state)); } - public CarlaUE4EditorTarget(TargetInfo Target) : + public CarlaUnrealEditorTarget(TargetInfo Target) : base(Target) { DefaultBuildSettings = BuildSettingsVersion.Latest;