Several build order fixes, switch from boost "exclude" projects to "include".

This commit is contained in:
Marcel Pi 2024-03-17 11:46:19 +01:00
parent 17f9d28a45
commit 36a29194bb
3 changed files with 49 additions and 59 deletions

View File

@ -135,24 +135,17 @@ carla_fetchcontent_option (BOOST_ENABLE_MPI OFF)
carla_fetchcontent_option (BOOST_LOCALE_WITH_ICU OFF)
carla_fetchcontent_option (BOOST_LOCALE_WITH_ICONV OFF)
set (
BOOST_EXCLUDED_PROJECTS
iostreams
locale
redis
timer
wave
url
mysql
nowide
stacktrace
contract
fiber
log
program_options
BOOST_INCLUDED_PROJECTS
asio
iterator
python
date_time
geometry
gil
container
variant2
)
carla_fetchcontent_option (
BOOST_EXCLUDE_LIBRARIES
"${BOOST_EXCLUDED_PROJECTS}")
carla_fetchcontent_option (BOOST_INCLUDE_LIBRARIES "${BOOST_INCLUDED_PROJECTS}")
carla_dependency_add(
boost
${CARLA_BOOST_TAG}

View File

@ -67,6 +67,8 @@ macro (carla_error)
message (FATAL_ERROR ${ARGN})
endmacro ()
carla_message ("CARLA is set to be built using the ${CMAKE_BUILD_TYPE} cmake build type.")
include (CheckCCompilerFlag)
include (CheckCXXCompilerFlag)
include (CheckLinkerFlag)

View File

@ -72,14 +72,10 @@ add_custom_command (
VERBATIM
)
add_custom_target (
carla-unreal-generate-project-files
DEPENDS
${CARLA_UE_PATH}/CMakeLists.txt
)
set (
UE_DEPENDENCIES
UE_DEPENDENCIES_ORDER_ONLY
carla-server
libsqlite3
Boost::asio
@ -93,10 +89,20 @@ set (
rpc
)
set (
CARLA_UNREAL_INCLUDE_PATHS_FILE_PATH
${CMAKE_CURRENT_BINARY_DIR}/Includes.inc
)
set (UE_DEPENDENCIES ${UE_DEPENDENCIES_ORDER_ONLY})
if (BUILD_CARLA_CLIENT)
list (APPEND UE_DEPENDENCIES_ORDER_ONLY carla-client)
endif ()
if (BUILD_PYTHON_API)
list (APPEND UE_DEPENDENCIES_ORDER_ONLY carla-python-api)
endif ()
set (CARLA_UNREAL_INCLUDE_PATHS_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/Includes.inc)
set (CARLA_UNREAL_LIBRARIES_PATHS_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/Libraries.inc)
set (CARLA_UNREAL_OPTIONS_PATHS_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/Options.inc)
set (
CARLA_UNREAL_INCLUDE_PATHS
@ -111,11 +117,6 @@ foreach (UE_DEP ${UE_DEPENDENCIES})
)
endforeach ()
set (
CARLA_UNREAL_LIBRARIES_PATHS_FILE_PATH
${CMAKE_CURRENT_BINARY_DIR}/Libraries.inc
)
set (
CARLA_UNREAL_LIBRARIES
$<TARGET_FILE:libsqlite3>
@ -132,11 +133,6 @@ foreach (UE_DEP ${UE_DEPENDENCIES})
endif ()
endforeach ()
set (
CARLA_UNREAL_OPTIONS_PATHS_FILE_PATH
${CMAKE_CURRENT_BINARY_DIR}/Options.inc
)
set (UNREAL_PROJECT_OPTIONS)
if (ENABLE_ROS2)
@ -155,11 +151,6 @@ if (ENABLE_OSM2ODR)
)
endif()
add_dependencies (
carla-unreal-generate-project-files
${UE_DEPENDENCIES}
)
if (CMAKE_TOOLCHAIN_FILE)
@ -182,10 +173,24 @@ endif ()
add_custom_target (
carla-unreal-generate-project-files
DEPENDS
${CARLA_UE_PATH}/CMakeLists.txt
)
add_dependencies (
carla-unreal-generate-project-files
${UE_DEPENDENCIES_ORDER_ONLY}
)
add_custom_command (
OUTPUT
${CARLA_UNREAL_INCLUDE_PATHS_FILE_PATH}
${CARLA_UNREAL_LIBRARIES_PATHS_FILE_PATH}
${CARLA_UNREAL_OPTIONS_PATHS_FILE_PATH}
COMMENT
"Configuring Carla Unreal..."
COMMAND ${CMAKE_COMMAND} -E rm -f ${CARLA_UNREAL_INCLUDE_PATHS_FILE_PATH}
@ -214,13 +219,15 @@ add_custom_target (
DEPENDS
${CARLA_UNREAL_INCLUDE_PATHS_FILE_PATH}
${CARLA_UNREAL_LIBRARIES_PATHS_FILE_PATH}
${CARLA_UNREAL_OPTIONS_PATHS_FILE_PATH}
)
add_dependencies (
carla-unreal-configure
carla-unreal-generate-project-files
${UE_DEPENDENCIES_ORDER_ONLY}
)
list (APPEND UE_DEPENDENCIES_ORDER_ONLY carla-unreal-configure)
add_custom_command (
@ -247,9 +254,11 @@ add_custom_target (
add_dependencies (
carla-unreal
carla-unreal-configure
${UE_DEPENDENCIES_ORDER_ONLY}
)
list (APPEND UE_DEPENDENCIES_ORDER_ONLY carla-unreal)
if (WIN32)
@ -270,19 +279,6 @@ set (
${CARLA_UNREAL_ENGINE_PATH}/Engine/Binaries/${UE_SYSTEM_NAME}/UnrealEditor${EXE_EXT}
)
set (
LAUNCH_DEPENDENCIES
carla-unreal
)
if (BUILD_PYTHON_API)
list (
APPEND
LAUNCH_DEPENDENCIES
carla-python-api
)
endif ()
add_custom_target (
@ -315,11 +311,10 @@ add_custom_target (
add_dependencies (
launch
${LAUNCH_DEPENDENCIES}
${UE_DEPENDENCIES_ORDER_ONLY}
)
file (
MAKE_DIRECTORY
${CARLA_UE_PATH}/Content/Carla/ExportedMaps