cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

How to use Unreal-Linux-From-Windows-Toolchain.cmake to cross compile for Linux from Windows?

Open lincoln310 opened this issue 1 year ago • 1 comments

I am tring to cross compile cesium-native for linux from windows. And I created this bat:

cmake -B build-linux -S . -DCMAKE_TOOLCHAIN_FILE="unreal-linux-from-windows-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build-linux --target install

According to the content in cmake, I added these to Enviroments. image

But it still run into this error: image

This is the cross compile tool chain: image

lincoln310 avatar Oct 12 '24 09:10 lincoln310

Hi @lincoln310, we haven't tried cross-compiling in awhile, because these days we just compile for Linux on Linux. You might find it easier to do the same by using WSL2.

That said, you may be able to fix your immediate problem just by adding -G Ninja to your cmake configure command-line. You'll need to install Ninja, for course.

kring avatar Oct 18 '24 14:10 kring

Closing since this issue is more of a question, and it's been inactive for a while.

j9liu avatar May 28 '25 18:05 j9liu