On 2012-10-28 15:52, Reinis Danne wrote: > On Sun, Oct 28, 2012 at 02:14:13PM +0100, David van der Spoel wrote: >> Hi, >> >> I'm trying to link my project to the development version of openbabel2 >> which is installed in $HOME/openbabel-dev/install >> I there added the FindOpenBabel2.cmake that floats around the internet >> to my software packages cmake directory, > > Are you reffering to this one? > http://openbabel.org/api/2.3/cmake_project.shtml Yes.
> >> and then added the stuff below >> to the software package's CMakeLists.txt: >> >> option(GMX_OPENBABEL2 "Add support for OpenBabel2 functionality" OFF) >> if (GMX_OPENBABEL2) >> find_package(OpenBabel2 REQUIRED) >> set(PKG_OPENBABEL2 "") >> if (OPENBABEL2_FOUND) >> include_directories(${OPENBABEL2_INCLUDE_DIR}) >> set(PKG_OPENBABEL2 openbabel2) >> set(HAVE_LIBOPENBABEL2 1) >> list(APPEND GMX_EXTRA_LIBRARIES ${OPENBABEL2_LIBRARIES}) >> endif(OPENBABEL2_FOUND) >> endif (GMX_OPENBABEL2) >> >> and used the following cmake flag: >> -DCMAKE_PREFIX_PATH=$HOME/openbabel-dev/install >> >> using this setup the openbabel library is not found, that is I don't get >> the exact path to it. If I instead use the system-wide installed version >> cmake-ing and linking works fine. Any clues to whether this could be due >> to the above cmake code, the FindOpenBabel2.cmake or something else? > > Are you getting any path with this setup, if so, what is it? > Does it find the correct library if you set in environment > OPENBABEL2_LIBRARIES pointing to library dir in your > installation? That picks up the right library, but this is now not consistent with the rest of the OB cmake stuff: % grep -i babel gromacs/CMakeCache.txt CMAKE_PREFIX_PATH:UNINITIALIZED=/Users/spoel/GG/openbabel-dev/install:/opt/local //Add support for OpenBabel2 functionality GMX_OPENBABEL2:BOOL=ON OPENBABEL2_EXECUTABLE:FILEPATH=/Users/spoel/GG/openbabel-dev/install/bin/babel libgromacs_LIB_DEPENDS:STATIC=general;/opt/local/lib/libcln.dylib;general;/usr/lib/libsqlite3.dylib;general;/Users/spoel/GG/openbabel-dev/install/lib/libopenbabel.dylib;general;/System/Library/Frameworks/Accelerate.framework;general;m;general;/opt/local/lib/libfftw3.dylib;general;/opt/local/lib/libxml2.dylib; OPENBABEL2_CFLAGS:INTERNAL=-I/opt/local/include/openbabel-2.0 OPENBABEL2_CFLAGS_I:INTERNAL= OPENBABEL2_CFLAGS_OTHER:INTERNAL= OPENBABEL2_FOUND:INTERNAL=1 OPENBABEL2_INCLUDEDIR:INTERNAL=/opt/local/include OPENBABEL2_INCLUDE_DIRS:INTERNAL=/opt/local/include/openbabel-2.0 OPENBABEL2_LDFLAGS:INTERNAL=-L/opt/local/lib;-lopenbabel etc. and my executables link, but crash immediately. > > > Reinis > > ------------------------------------------------------------------------------ > WINDOWS 8 is here. > Millions of people. Your app in 30 days. > Visit The Windows 8 Center at Sourceforge for all your go to resources. > http://windows8center.sourceforge.net/ > join-generation-app-and-make-money-coding-fast/ > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > -- David van der Spoel, Ph.D., Professor of Biology Dept. of Cell & Molec. Biol., Uppsala University. Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. sp...@xray.bmc.uu.se http://folding.bmc.uu.se ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss