Multiple minor fixes related to build and docs.

This commit is contained in:
Marcel Pi 2024-09-12 16:35:45 +02:00 committed by Blyron
parent abdff1716f
commit c00d44d2dc
6 changed files with 61 additions and 41 deletions

2
.gitignore vendored
View File

@ -10,4 +10,6 @@ out/
CMakeSettings.json
.clangd
Help.md

View File

@ -12,8 +12,7 @@ include (FetchContent)
set (CARLA_DEPENDENCIES_PENDING)
macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
if (PREFER_CLONE)
macro (carla_git_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
carla_message ("Cloning ${NAME}...")
FetchContent_Declare (
${NAME}
@ -26,7 +25,9 @@ macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
${ARGN}
)
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
else ()
endmacro ()
macro (carla_download_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
carla_message ("Downloading ${NAME}...")
FetchContent_Declare (
${NAME}
@ -35,6 +36,13 @@ macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
${ARGN}
)
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
endmacro ()
macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
if (PREFER_CLONE)
carla_git_dependency_add (${NAME} ${TAG} ${ARCHIVE_URL} ${GIT_URL})
else ()
carla_download_dependency_add (${NAME} ${TAG} ${ARCHIVE_URL} ${GIT_URL})
endif ()
endmacro ()

View File

@ -39,7 +39,7 @@ endfunction ()
macro (carla_option NAME DESCRIPTION VALUE)
option (${NAME} ${DESCRIPTION} ${VALUE})
carla_message ("(option) ${NAME} : ${VALUE}")
carla_message ("(option) ${NAME} : ${${NAME}}")
get_property (DOCS GLOBAL PROPERTY CARLA_OPTION_DOCS)
string (
APPEND
@ -55,7 +55,7 @@ endmacro ()
macro (carla_string_option NAME DESCRIPTION VALUE)
set (${NAME} "${VALUE}")
carla_message ("(option) ${NAME} : \"${VALUE}\"")
carla_message ("(option) ${NAME} : \"${${NAME}}\"")
get_property (DOCS GLOBAL PROPERTY CARLA_OPTION_DOCS)
string (
APPEND

View File

@ -1,5 +1,11 @@
{
"version": 8,
"version": 4,
"cmakeMinimumRequired":
{
"major": 3,
"minor": 27,
"patch": 2
},
"configurePresets":
[
{

View File

@ -1,3 +1,11 @@
project (
libcarla
LANGUAGES
CXX
VERSION
${CARLA_VERSION}
)
set (
LIBCARLA_SOURCE_PATH
${CARLA_WORKSPACE_PATH}/LibCarla/source
@ -15,14 +23,6 @@ carla_two_step_configure_file (
if (BUILD_CARLA_SERVER)
project (
carla-server
LANGUAGES
CXX
VERSION
${CARLA_VERSION}
)
file (
GLOB
LIBCARLA_SERVER_SOURCES
@ -159,14 +159,6 @@ endif ()
if (BUILD_CARLA_CLIENT)
project (
carla-client
LANGUAGES
CXX
VERSION
${CARLA_VERSION}
)
file (
GLOB
LIBCARLA_CLIENT_HEADERS

View File

@ -357,10 +357,23 @@ add_dependencies (
${UE_DEPENDENCIES_ORDER_ONLY}
)
function (add_carla_ue_package_target PACKAGE_CONFIGURATION UE_BUILD_CONFIGURATION)
function (
add_carla_ue_package_target
PACKAGE_CONFIGURATION
UE_BUILD_CONFIGURATION)
set (
CARLA_TARGET_PACKAGE_PATH
${CARLA_PACKAGE_PATH}/${UE_SYSTEM_NAME}
)
if (NOT "${PACKAGE_CONFIGURATION}" STREQUAL "")
set (TARGET_NAME_SUFFIX -${PACKAGE_CONFIGURATION})
string (TOLOWER "${TARGET_NAME_SUFFIX}" TARGET_NAME_SUFFIX)
else ()
set (PACKAGE_CONFIGURATION "default (shipping)")
endif ()
carla_add_custom_target (
carla-unreal-package${TARGET_NAME_SUFFIX}
"Create a CARLA package in ${PACKAGE_CONFIGURATION} mode."
@ -395,7 +408,6 @@ function (add_carla_ue_package_target PACKAGE_CONFIGURATION UE_BUILD_CONFIGURATI
VERBATIM
)
set (CARLA_TARGET_PACKAGE_PATH ${CARLA_PACKAGE_PATH}/${UE_SYSTEM_NAME})
add_custom_command (
TARGET carla-unreal-package${TARGET_NAME_SUFFIX}
POST_BUILD