Path error when building Cesium for UE5 on Linux


I cloned the cesium-unreal repo, cloned with submodules and built cesium-native and put include/ and lib/ folders to the cesium-unreal/Source/ThirdParty (lib/ folder to the ThirdParty/Linux-x64).

When I try to build my project form Visual Code i cannot do this due to this error:

[1/17] Compile Module.CesiumRuntime.12.cpp
In file included from /home/stc/Documents/unreal-projects/unreal3dserver/Intermediate/Build/Linux/x64/unreal3dserver/Debug/CesiumRuntime/Module.CesiumRuntime.12.cpp:2:
In file included from /home/stc/Documents/unreal-projects/unreal3dserver/Plugins/cesium-unreal/Source/CesiumRuntime/Private/UnrealMetadataConversions.cpp:3:
/home/stc/Documents/unreal-projects/unreal3dserver/Plugins/cesium-unreal/Source/CesiumRuntime/Public/UnrealMetadataConversions.h:5:10: fatal error: 'CesiumGltf/PropertyTypeTraits.h' file not found
#include "CesiumGltf/PropertyTypeTraits.h"

And few more similar errors due problems with path search.
I checked CesiumRuntime.Build.cs inside Source/CesiumRuntime and here I found this include (there are few same ones):

            new string[] {
                Path.Combine(ModuleDirectory, "../ThirdParty/include")

And the main thing here - relative path with “ModuleDirectory” and “…/ThirdParty”. As far as I understood, ModuleDirectory is located inside Module, e.g. “Source/CesiumRuntime/” - is the module directory. That’s why folder “ThirdParty” should be on the same level as other ModuleDirectory, so I have.

So, I cannot understand where is my mistake and why I keep getting those errors if looks like that my cesium folder structure is ok.

To be more clear here is the abstract scheme of folders:


Hi @sandwitch, welcome to the community!

We have a developer setup guide for Linux users on Github. Perhaps there’s a step or two that you’re missing?

I don’t have Linux myself, but I am seeing this note from the guide under Build and package the Cesium for Unreal plugin:

Note: On Linux (unlike Windows), it is essential that the CesiumForUnreal plugin go in the Plugins/Marketplace/ subdirectory, rather than directly in Plugins/ . Otherwise, the relative paths to other plugin .so files that the Unreal Build Tool has built into the plugin will not resolve correctly.

So it looks like you actually have to build the plugin from command line, then copy it into your engine’s Plugins/Marketplace directory. Let us know if that helps!