Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Use external project for building cesium #142

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

johannes-wolf
Copy link
Contributor

@johannes-wolf johannes-wolf commented Jul 4, 2024

Allows building erdblick using Ninja. The solution to build cesium using CMakes ExternalProject instead of FetchContent is a fixed version taken from #64.

This PR also adds a CMakePresets.json, that defines a release and debug preset. The build script call those presets. Presets make it easy defining CMake options for certain build-types and/or changing the build options locally without having to touch the shell scripts.


rm -rf build && mkdir build
cd build
mkdir deps
mkdir assets
emcmake cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
cmake --build . -- -j
cmake --build . -- -j"$(nproc)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without specifying the job limit, the build fails if the env. CMAKE_GENERATOR is set to "Ninja".

@josephbirkner
Copy link
Collaborator

Ok 👍

@johannes-wolf johannes-wolf force-pushed the cesium-build-external branch from 811c094 to cc8d5e8 Compare July 17, 2024 14:20
- Enables build using Ninja
- Isolates build to prevent CMake target conflicts
@johannes-wolf johannes-wolf force-pushed the cesium-build-external branch from cc8d5e8 to 6d9487b Compare July 23, 2024 11:05
@johannes-wolf johannes-wolf force-pushed the cesium-build-external branch from aca86aa to b592789 Compare July 23, 2024 11:42
@johannes-wolf johannes-wolf merged commit f7595b5 into main Aug 2, 2024
1 check passed
@johannes-wolf johannes-wolf deleted the cesium-build-external branch August 2, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants