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

Unable to build when CESIUM_MSVC_STATIC_RUNTIME_ENABLED is ON #1014

Open
jqntn opened this issue Nov 26, 2024 · 1 comment
Open

Unable to build when CESIUM_MSVC_STATIC_RUNTIME_ENABLED is ON #1014

jqntn opened this issue Nov 26, 2024 · 1 comment

Comments

@jqntn
Copy link
Contributor

jqntn commented Nov 26, 2024

Hi,

When the CESIUM_MSVC_STATIC_RUNTIME_ENABLED option of the CMakeLists.txt is set to ON, building cesium-native fails at the linker stage.

I'm using an up-to-date Visual Studio 2022 + CMake setup.

I know you managed to make this work for cesium-unity (see), didn't have time to investigate further.

Tested with v0.41.0.

image

@kring
Copy link
Member

kring commented Nov 26, 2024

@jqntn the trick is to make sure your vcpkg triplet is also set to use the static runtime library. Here's where that's done in cesium-unity:
https://github.com/CesiumGS/cesium-unity/blob/v1.13.1/native~/vcpkg/triplets/x64-windows-unity.cmake#L4

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

No branches or pull requests

2 participants