Comment 1 for bug 1778174

Revision history for this message
Matt Pekar (sloofgrum) wrote :

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.