Dear All,

I have finally solved the puzzle that was troubling me since 2.3.2 release (or 
perhaps even earlier) -
how to create a statically linked openbabel with InChI support.
This had troubled smarter people than myself too - see
http://baoilleach.blogspot.com/2013/02/compiling-open-babel-with-mingw-on.html

Hopefully this will be useful for others as well:
1) Two files need to be patched:
src/CMakeLists.txt
diff src/CMakeLists.txt.orig src/CMakeLists.txt
180c180
<     add_subdirectory(formats/inchi103)
---
>     add_subdirectory(formats/libinchi)

src/formats/formats.cmake
diff src/formats/formats.cmake.orig src/formats/formats.cmake
146c146
<     include_directories(${CMAKE_SOURCE_DIR}/include/inchi103)
---
>     include_directories(${CMAKE_SOURCE_DIR}/include/inchi)

2) After that openbabel can be configured with the following options to cmake:
cmake -DBUILD_SHARED=FALSE -DWITH_STATIC_INCHI=ON ..

running "make;make install" produces statically linked libs and executables.

It would be nice to commit the fix to the version control...

Best wishes,
Igor


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to