2024-09-12 22:35:45 +08:00
|
|
|
project (
|
|
|
|
libcarla
|
|
|
|
LANGUAGES
|
|
|
|
CXX
|
|
|
|
VERSION
|
|
|
|
${CARLA_VERSION}
|
|
|
|
)
|
|
|
|
|
2024-03-19 03:25:56 +08:00
|
|
|
set (
|
|
|
|
LIBCARLA_SOURCE_PATH
|
|
|
|
${CARLA_WORKSPACE_PATH}/LibCarla/source
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-02-23 00:39:48 +08:00
|
|
|
carla_two_step_configure_file (
|
2024-02-05 18:52:25 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/Version.h
|
2024-02-23 00:39:48 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/Version.h.in
|
2024-02-05 18:52:25 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if (BUILD_CARLA_SERVER)
|
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_SOURCES
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/Buffer.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/Exception.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/geom/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/SensorHeaderSerializer.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.cpp
|
|
|
|
)
|
2024-03-19 03:25:56 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
if (ENABLE_ROS2)
|
2024-02-05 18:52:25 +08:00
|
|
|
file (
|
2024-03-08 00:11:15 +08:00
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_SOURCES_ROS2
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/ros2/*.cpp
|
2024-02-05 18:52:25 +08:00
|
|
|
)
|
2024-03-08 00:11:15 +08:00
|
|
|
list (
|
|
|
|
APPEND
|
|
|
|
LIBCARLA_SERVER_SOURCES
|
|
|
|
${LIBCARLA_SERVER_SOURCES_ROS2}
|
2024-02-05 18:52:25 +08:00
|
|
|
)
|
2024-03-08 00:11:15 +08:00
|
|
|
endif ()
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_SOURCES_THIRD_PARTY
|
2024-09-19 23:35:18 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/odrSpiral/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/moodycamel/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/pugixml/*.cpp
|
2024-03-08 00:11:15 +08:00
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_HEADERS
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/geom/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/compiler/*.h
|
|
|
|
)
|
|
|
|
|
|
|
|
if (ENABLE_ROS2)
|
2024-02-05 18:52:25 +08:00
|
|
|
file (
|
2024-03-08 00:11:15 +08:00
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_HEADERS_ROS2
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/ros2/*.h
|
2024-02-07 04:47:29 +08:00
|
|
|
)
|
2024-03-08 00:11:15 +08:00
|
|
|
list (
|
|
|
|
APPEND
|
|
|
|
LIBCARLA_SERVER_HEADERS
|
|
|
|
${LIBCARLA_SERVER_HEADERS_ROS2}
|
2024-02-05 18:52:25 +08:00
|
|
|
)
|
2024-03-14 23:27:10 +08:00
|
|
|
set (CARLA_ROS2_DEFINITIONS WITH_ROS2)
|
2024-03-08 00:11:15 +08:00
|
|
|
endif ()
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-05-21 19:30:13 +08:00
|
|
|
if (ENABLE_ROS2_DEMO)
|
|
|
|
set (CARLA_ROS2_DEFINITIONS ${CARLA_ROS2_DEFINITIONS} WITH_ROS2_DEMO)
|
|
|
|
endif ()
|
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_SERVER_HEADERS_THIRD_PARTY
|
2024-09-19 23:35:18 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/odrSpiral/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/moodycamel/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/pugixml/*.hpp
|
2024-03-08 00:11:15 +08:00
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-05-15 23:50:06 +08:00
|
|
|
carla_add_library (
|
2024-03-08 00:11:15 +08:00
|
|
|
carla-server
|
2024-05-15 23:50:06 +08:00
|
|
|
"Build the CARLA server."
|
2024-03-08 00:11:15 +08:00
|
|
|
${LIBCARLA_SERVER_HEADERS}
|
|
|
|
${LIBCARLA_SERVER_SOURCES}
|
|
|
|
${LIBCARLA_SERVER_HEADERS_THIRD_PARTY}
|
|
|
|
${LIBCARLA_SERVER_SOURCES_THIRD_PARTY}
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
target_link_libraries (
|
|
|
|
carla-server PUBLIC
|
|
|
|
Boost::asio
|
|
|
|
Boost::geometry
|
|
|
|
Boost::algorithm
|
|
|
|
Boost::assert
|
|
|
|
Boost::gil
|
|
|
|
RecastNavigation::Recast
|
|
|
|
RecastNavigation::Detour
|
|
|
|
RecastNavigation::DetourCrowd
|
|
|
|
png_static
|
|
|
|
zlibstatic
|
|
|
|
rpc
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories (
|
|
|
|
carla-server PUBLIC
|
|
|
|
${LIBCARLA_SOURCE_PATH}
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
target_compile_definitions (
|
|
|
|
carla-server PUBLIC
|
|
|
|
${CARLA_COMMON_DEFINITIONS}
|
|
|
|
${CARLA_EXCEPTION_DEFINITIONS}
|
|
|
|
${CARLA_RTTI_DEFINITIONS}
|
2024-03-14 23:27:10 +08:00
|
|
|
${CARLA_ROS2_DEFINITIONS}
|
2024-03-08 00:11:15 +08:00
|
|
|
)
|
2024-03-14 23:27:10 +08:00
|
|
|
|
|
|
|
if (ENABLE_ROS2)
|
|
|
|
add_dependencies (carla-server carla-ros2-native)
|
|
|
|
endif ()
|
|
|
|
|
2024-02-05 18:52:25 +08:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BUILD_CARLA_CLIENT)
|
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_HEADERS
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/client/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/client/detail/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/geom/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/image/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/nav/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/pointcloud/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/profiler/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/data/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/trafficmanager/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/compiler/*.h
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
if (ENABLE_RSS)
|
2024-02-05 18:52:25 +08:00
|
|
|
file (
|
2024-03-08 00:11:15 +08:00
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_HEADERS_RSS
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rss/*.h
|
|
|
|
)
|
|
|
|
list (
|
|
|
|
APPEND
|
|
|
|
LIBCARLA_CLIENT_HEADERS
|
|
|
|
${LIBCARLA_CLIENT_HEADERS_RSS}
|
2024-02-05 18:52:25 +08:00
|
|
|
)
|
2024-03-08 00:11:15 +08:00
|
|
|
endif ()
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_HEADERS_THIRD_PARTY
|
2024-09-19 23:35:18 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/odrSpiral/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/moodycamel/*.h
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/pugixml/*.hpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/pugixml/*.h
|
2024-03-08 00:11:15 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_SOURCES
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/client/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/client/detail/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/geom/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/image/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/nav/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/opendrive/parser/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/pointcloud/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/element/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/general/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/object/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/road/signal/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rpc/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/data/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/sensor/s11n/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/detail/tcp/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/streaming/low_level/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/multigpu/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/trafficmanager/*.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if (ENABLE_RSS)
|
2024-03-19 03:25:56 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_SOURCES_RSS
|
|
|
|
${LIBCARLA_SOURCE_PATH}/carla/rss/*.cpp
|
|
|
|
)
|
|
|
|
list (
|
|
|
|
APPEND
|
|
|
|
LIBCARLA_CLIENT_SOURCES
|
|
|
|
${LIBCARLA_CLIENT_SOURCES_RSS}
|
|
|
|
)
|
2024-03-08 00:11:15 +08:00
|
|
|
endif ()
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
file (
|
|
|
|
GLOB
|
|
|
|
LIBCARLA_CLIENT_SOURCES_THIRD_PARTY
|
2024-09-19 23:35:18 +08:00
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/odrSpiral/*.cpp
|
|
|
|
${LIBCARLA_SOURCE_PATH}/third-party/pugixml/*.cpp
|
2024-03-08 00:11:15 +08:00
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-05-15 23:50:06 +08:00
|
|
|
carla_add_library (
|
2024-03-08 00:11:15 +08:00
|
|
|
carla-client
|
2024-05-15 23:50:06 +08:00
|
|
|
"Build the CARLA client."
|
2024-03-08 00:11:15 +08:00
|
|
|
${LIBCARLA_CLIENT_HEADERS}
|
|
|
|
${LIBCARLA_CLIENT_SOURCES}
|
|
|
|
${LIBCARLA_CLIENT_HEADERS_THIRD_PARTY}
|
|
|
|
${LIBCARLA_CLIENT_SOURCES_THIRD_PARTY}
|
|
|
|
)
|
2024-02-20 23:34:31 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
target_link_libraries (
|
|
|
|
carla-client PUBLIC
|
|
|
|
Boost::asio
|
2024-04-09 22:32:09 +08:00
|
|
|
Boost::python
|
2024-03-08 00:11:15 +08:00
|
|
|
Boost::algorithm
|
|
|
|
Boost::geometry
|
|
|
|
Boost::assert
|
|
|
|
Boost::gil
|
|
|
|
RecastNavigation::Recast
|
|
|
|
RecastNavigation::Detour
|
|
|
|
RecastNavigation::DetourCrowd
|
|
|
|
png_static
|
|
|
|
zlibstatic
|
|
|
|
rpc
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories (
|
|
|
|
carla-client PUBLIC
|
|
|
|
${LIBCARLA_SOURCE_PATH}
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-03-08 00:11:15 +08:00
|
|
|
target_compile_definitions (
|
|
|
|
carla-client PUBLIC
|
|
|
|
${CARLA_COMMON_DEFINITIONS}
|
|
|
|
${CARLA_RTTI_DEFINITIONS}
|
|
|
|
)
|
2024-02-05 18:52:25 +08:00
|
|
|
|
2024-02-22 23:49:15 +08:00
|
|
|
endif ()
|