We have a snap project where multiple binaries depend on a single custom library. With environment variables we could build the library part, then have the binary parts reference the lib output.
override-build: |
export LD_LIBRARY_PATH=$SNAPCRAFT_PRIME/opt/myproject/lib
export PKG_CONFIG_PATH=$SNAPCRAFT_PRIME/opt/myproject/lib/pkgconfig
# ^ environment settings above are discarded by snapcraftctl
snapcraftctl -d build
Alternatively if perhaps the cmake module had an option to pass environment variables in addition to "configflags", that'd be another way to resolve our issue.
We have a snap project where multiple binaries depend on a single custom library. With environment variables we could build the library part, then have the binary parts reference the lib output.
override-build: | PATH=$SNAPCRAFT _PRIME/ opt/myproject/ lib PATH=$SNAPCRAFT _PRIME/ opt/myproject/ lib/pkgconfig
export LD_LIBRARY_
export PKG_CONFIG_
# ^ environment settings above are discarded by snapcraftctl
snapcraftctl -d build
Alternatively if perhaps the cmake module had an option to pass environment variables in addition to "configflags", that'd be another way to resolve our issue.