since FindOpenBabel2.cmake uses pkg-config, you can do something like

PKG_CONFIG_PATH=~/opt/lib/pkgconfig/ cmake ..

That said, I believe there may a better way to link to openbabel with cmake
using the files in:

~/opt/lib/cmake/openbabel2/

but I don't know what that is.

On Jun 7, 2017, at 4:22 AM, Davide Olianas <dav...@davideolianas.com> wrote:

Hello,

the openbabel version shipped with my distribution (ubuntu 16.04) is quite
old; I’d like to link my programs to the most recent one, which I installed
in ~/opt using the option CMAKE_INSTALL_PREFIX=~/opt.

Sadly, the environment variable CMAKE_PREFIX_PATH doesn’t appear to be used
by FindOpenBabel2.cmake. I copied this module because OpenBabel can’t be
found by default (is this a packaging problem of the distribution? If not,
could it be possible to add FindOpenBabel2.cmake to OpenBabel source such
that package maintainers can add the module?)

You can clone this repo <https://github.com/davethecipo/ob24api> for a
minimal (not) working example. If you have vagrant installed, just run vagrant
up to set up a clean virtual machine. If you don’t use vagrant, you can
look bootstrap.sh for the commands to reproduce the problem.

Thanks for any help,
Davide
​
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot______
_________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to