Multiple minor fixes related to build and docs.
This commit is contained in:
parent
abdff1716f
commit
c00d44d2dc
|
@ -10,4 +10,6 @@ out/
|
|||
|
||||
CMakeSettings.json
|
||||
|
||||
.clangd
|
||||
|
||||
Help.md
|
||||
|
|
|
@ -12,29 +12,37 @@ include (FetchContent)
|
|||
|
||||
set (CARLA_DEPENDENCIES_PENDING)
|
||||
|
||||
macro (carla_git_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
|
||||
carla_message ("Cloning ${NAME}...")
|
||||
FetchContent_Declare (
|
||||
${NAME}
|
||||
GIT_REPOSITORY ${GIT_URL}
|
||||
GIT_TAG ${TAG}
|
||||
GIT_SUBMODULES_RECURSE ON
|
||||
GIT_SHALLOW ON
|
||||
GIT_PROGRESS ON
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
${ARGN}
|
||||
)
|
||||
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
|
||||
endmacro ()
|
||||
|
||||
macro (carla_download_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
|
||||
carla_message ("Downloading ${NAME}...")
|
||||
FetchContent_Declare (
|
||||
${NAME}
|
||||
URL ${ARCHIVE_URL}
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
${ARGN}
|
||||
)
|
||||
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
|
||||
endmacro ()
|
||||
|
||||
macro (carla_dependency_add NAME TAG ARCHIVE_URL GIT_URL)
|
||||
if (PREFER_CLONE)
|
||||
carla_message ("Cloning ${NAME}...")
|
||||
FetchContent_Declare (
|
||||
${NAME}
|
||||
GIT_REPOSITORY ${GIT_URL}
|
||||
GIT_TAG ${TAG}
|
||||
GIT_SUBMODULES_RECURSE ON
|
||||
GIT_SHALLOW ON
|
||||
GIT_PROGRESS ON
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
${ARGN}
|
||||
)
|
||||
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
|
||||
carla_git_dependency_add (${NAME} ${TAG} ${ARCHIVE_URL} ${GIT_URL})
|
||||
else ()
|
||||
carla_message ("Downloading ${NAME}...")
|
||||
FetchContent_Declare (
|
||||
${NAME}
|
||||
URL ${ARCHIVE_URL}
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
${ARGN}
|
||||
)
|
||||
list (APPEND CARLA_DEPENDENCIES_PENDING ${NAME})
|
||||
carla_download_dependency_add (${NAME} ${TAG} ${ARCHIVE_URL} ${GIT_URL})
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
{
|
||||
"version": 8,
|
||||
"version": 4,
|
||||
"cmakeMinimumRequired":
|
||||
{
|
||||
"major": 3,
|
||||
"minor": 27,
|
||||
"patch": 2
|
||||
},
|
||||
"configurePresets":
|
||||
[
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue