You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all! I'm using vcpkg with a chainloaded toolchain that defines CMAKE_SYSROOT (for cross-compiling). This is all working really great, but I'm trying to setup binary caching for it and some absolute paths end up in various *Targets.cmake files. What I've done to workaround the issue for now is define an environment variable to my sysroot and added a overlay for the vcpkg-cmake-config port with this added:
if (DEFINEDENV{MY_SYSROOT})
string(REPLACE"$ENV{MY_SYSROOT}" [[${CMAKE_SYSROOT}]] contents "${contents}")
endif()
which makes the builds portable. Is there a way this could be integrated into the upstream vcpkg-cmake-config? It doesn't seem like there's access to the CMAKE_SYSROOT variable from that script as it runs from the portfile, so it would need to depend on vcpkg-cmake-get-vars or something like that.
Or is this considered to be an unsupported vcpkg configuration and overlaying that is the correct solution?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey all! I'm using vcpkg with a chainloaded toolchain that defines CMAKE_SYSROOT (for cross-compiling). This is all working really great, but I'm trying to setup binary caching for it and some absolute paths end up in various
*Targets.cmake
files. What I've done to workaround the issue for now is define an environment variable to my sysroot and added a overlay for thevcpkg-cmake-config
port with this added:which makes the builds portable. Is there a way this could be integrated into the upstream vcpkg-cmake-config? It doesn't seem like there's access to the CMAKE_SYSROOT variable from that script as it runs from the portfile, so it would need to depend on vcpkg-cmake-get-vars or something like that.
Or is this considered to be an unsupported vcpkg configuration and overlaying that is the correct solution?
Beta Was this translation helpful? Give feedback.
All reactions