-
Notifications
You must be signed in to change notification settings - Fork 215
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
build as an installable package and use vcpkg manifest mode to build standalone #1026
base: main
Are you sure you want to change the base?
Conversation
This is basically the addition of the vcpkg.json manifest and vcpkg-configuration.json, which are both pretty minimal. In practice, projects will probably copy those and add overlays.
Should be a no-op at this point, but will be required when we make Cesium Native installable.
The intent is for public target sources to be compiled into consumers of a target, but that is a no-op for header files. Including the public headers, which have paths pointing inside the project, causes an error when generating an export set.
This create the CMake files that create targets in an imported package.
Add a find module for zlib-ng, which can be installed and included by a config package. Other find modules may be necessary too.
VCPKG_MANIFEST_MODE isn't available before project() is called, so define a new variable CESIUM_USE_EZVCPKG to control the early loading of ezvcpkg.
Individual integrations can add their own overlay if they need it.
Also, try to make sure that vcpkg actually uses the desired triplet.
Looks like this causes the following issue in cesium-unreal:
Not sure why this would have broken here - the cesium-unreal/extern CMakeLists.txt is unchanged here and I don't see why the |
Thanks for being brave enough to test this with Cesium Unreal! What generator was used to build cesium-native? |
The problem is in the new cesium-native/CMakeLists.txt, which defines exports to install. The install(EXPORT...) command doesn't support generator expressions in its destination argument... which makes a certain amount of sense, even if it's inconsistent. The export files won't be used in the Unreal build, but I'll change the command to use a more suitable variable. |
In the Cesium for Unreal build, CMAKE_INSTALL_LIBDIR contains a generator expression, which the install(EXPORT ...) command doesn't process correctly. So, install the configuration files such as "cesium-nativeTargets.cmake" in ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake, which is a perfectly fine location. These files aren't used by the Cesium Unreal build anyway.
This PR has several moving parts:
vcpkg.json
andvcpkg-configuration.json
I'm using this branch to build vsgCs using cesium-native as a vcpkg overlay port. That usage needs to be documented here too. Also, while I've tried to preserve the old behavior using exvcpkg, I haven't tested this yet with Cesium for Unreal and other integrations in the classic style of using cesium-native as a CMake subdirectory.