-
Notifications
You must be signed in to change notification settings - Fork 457
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_PREFIX_PATH is not set with gnome extenstion #5272
Comments
kde-neon-6 seem to already have it, it just should be ported to the gnome one: snapcraft/snapcraft/extensions/kde_neon_6.py Lines 318 to 329 in f24c83d
But keep in mind that the kde-neon-6 implementation seem to have a bug: according to cmake documentation, environment variable (opposed to cmake variable named the same) uses P. S. Speaking of kde-neon-6 bugs, CMAKE_FIND_ROOT_PATH isn't a valid environment variable at all, it exists only as a cmake variable (i.e. could only be set as |
@ilya-fedin I've reported the first issue mentioned on the previous comment at #5302. Depending on the outcome of that (should it be an env variable or variable?), I'll report the second one later or not. |
CMAKE_PREFIX_PATH better to be an environment variable so one can then add additional paths with the cmake variable in snapcraft.yaml. With CMAKE_FIND_ROOT_PATH you have no choice as it exists only as a CMake variable so not sure how it depends on the outcome of CMAKE_PREFIX_PATH? Though, there shouldn't be any need in CMAKE_FIND_ROOT_PATH, CMAKE_PREFIX_PATH should be enough as CMake automatically gets derives all the paths from prefix. |
Bug Description
I'm trying to migrate my snap from snapcraft-desktop-helpers to the gnome extension but cmake is unable to find libraries located in the sdk with find_library calls. pkg_check_modules works but I can't change cmake rules of all libraries I use. I believe that's because snapcraft sets PKG_CONFIG_PATH but not CMAKE_PREFIX_PATH.
To Reproduce
Build any cmake project which is using find_library on dependencies provided by the gnome sdk
Environment
Snapcraft is running using LXD, installed via snap package on Arch which is running inside LXC container on NixOS (as snap has no support for NixOS).
snapcraft.yaml
Relevant log output
Additional context
I also reported this as https://bugs.launchpad.net/snapcraft/+bug/2098893
The text was updated successfully, but these errors were encountered: