Closed arkel-77 closed 1 month ago
The above occurs when trying to use global shared libraries obtained by building cesium-native
with sudo cmake --build build --target install
, and does not occur when cesium-native
is added as a subdirectory.
Hi @arkelley77, we unfortunately have never really built cesium-native dynamically, nor have we tried installing it and then referencing it as a system library. So I don't know what problems you might run into there, or how to solve them. I think that add_subdirectory
is probably the best way to use cesium-native for now, though we do welcome reasonable pull requests that make it usable in other ways!
@kring I've figured out some patches to various CMakeLists.txt
files throughout the repo that allow for building & installing shared libs instead of using the subdirectory workflow. Tried to push a branch but realized I don't have access to the repo, any chance you could give me just the permissions to make a PR?
@arkelley77 the way it's typically done on GitHub is that you fork our repo, push your changes to your fork, and then open a pull request into our repo. You shouldn't need any special permissions to do that. GitHub has some documention on this here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
(the earlier topics in the same section may be useful as well)
Let us know if you have any questions.
I figured out how to do it with only cmake flags on the command line. Turns out the original error in this thread is because cesium-native uses the GLM_FORCE_SIZE_T_LENGTH
macro by default, which breaks interop with code that doesn't use that macro. I opted to define the macro in my code, but specifying -DCESIUM_GLM_STRICT_ENABLED=OFF
when configuring cesium-native would work too.
main.cpp
:CMakeLists.txt
:CMake output:
related: #567