fix(LibCarla/cmake): install ros2/dds/ headers in server cmake for Windows builds - #9666
Merged
Blyron merged 1 commit intoApr 10, 2026
Conversation
…ndows builds ROS2.h unconditionally includes DDSMiddleware.h (added in carla-simulator#9644), but the server cmake header install loop only listed ros2/, missing the ros2/dds/ subdirectory. On Linux this was masked because the ros2 build type installs all headers via cmake/fast_dds/CMakeLists.txt. On Windows, only the server cmake runs, causing a fatal C1083 include error in the UE4 plugin build.
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
Contributor
Author
|
@LuisPovedaCano Hello, I'm creating this PR because I noticed that since PR #9644, there has been an issue building the Windows version of Carla. The issue looks like a minor problem, and a small change can resolve it. It is probably better to check whether this code change fixes the Windows build in GitHub CI before merging the PR #9645 to verify everything is correct. |
LuisPovedaCano
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR #9644 added
#include "carla/ros2/dds/DDSMiddleware.h"toROS2.hfor the newEnable(bool, DDSMiddleware)signature, but did not update the server cmake header install list. This breaks the Windows CI build with:Why this only affects Windows: LibCarla headers are installed to
CarlaDependencies/include/via two different cmake paths:make LibCarla ARGS="--ros2"): uses theros2build type, which delegates header installation tocmake/fast_dds/CMakeLists.txt. That file already installs allros2/subdirectories, includingros2/dds/. Working correctly.make LibCarla, no--ros2): uses theServerbuild type, which runscmake/server/CMakeLists.txt. This file contains a manually maintainedforeachloop that lists every subdirectory whose headers should be installed. It listed"ros2/"but not"ros2/dds/".The UE4 plugin includes
ROS2.hunconditionally (not behind#ifdef WITH_ROS2) fromCarlaEngine.h,CarlaEpisode.h,ActorROS2Handler.h, and several sensor.cppfiles. Before #9644,ROS2.hhad no subdirectory dependencies, so the missing entry was not a problem.Fix: add
"ros2/dds/"to the server cmakeforeachinstall loop, following the same pattern already used for other nested subdirectories ("opendrive/parser/","road/element/","streaming/detail/tcp/", etc.).Why this must merge before #9645: PR #9645 (delete legacy FastDDS-generated types) cannot pass Windows CI until this header installation gap is fixed. The error is caused by code already merged in #9644, not by #9645 itself.
Where has this been tested?
Tests:
Header installation verified:
Possible Drawbacks
None. This is a pure addition to the CMake install list. It cannot affect existing installs, only adds previously missing headers. The Linux build path is unaffected because it uses a separate CMake target (
cmake/fast_dds/CMakeLists.txt) that already installs these headers.This change is