Hi Marcus,
I’m having real troubles with the Mac superpackage builds because of some CMake issues.
Right now, we find the system’s libopenbabel.* file, but then link and copy the built libopenbabel files for the superpackage. The problem is that I build and rebuild OB frequently – sometimes with debugging, etc.
What I think we want is to use the bits when the Open Babel libraries aren’t found, although there’s no if/else case for Windows.
Could you take a look and fix this up?
Thanks,
-Geoff
Here’s the appropriate part of FindOpenBabel2.cmake:
if(EMBED_OPENBABEL)
MESSAGE(STATUS “Using Open Babel from superpackage”)
# Building a super-package, rely on the embedded paths
set(OPENBABEL2_VERSION_MET TRUE)
set(OPENBABEL2_INCLUDE_DIR {CMAKE_SOURCE_DIR}/openbabel/include {CMAKE_BINARY_DIR}/openbabel/include)
# This is a kludge – need to ask Marcus how to handle it better
find_library(OPENBABEL2_LIBRARIES NAMES openbabel openbabel-2
PATHS
{_obLinkDir} {GNUWIN32_DIR}/lib
ENV{OPENBABEL2_LIBRARIES} ) if (NOT OPENBABEL2_LIBRARIES) # look in superpackage if (APPLE) set(OPENBABEL2_LIBRARIES {CMAKE_BINARY_DIR}/lib/libopenbabel.dylib)
endif(APPLE)
if (UNIX AND NOT APPLE)
set(OPENBABEL2_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libopenbabel.so)
endif(UNIX AND NOT APPLE)
endif (NOT OPENBABEL2_LIBRARIES)
# We know the embedded OB will be trunk
set (OPENBABEL_IS_NEWER_THAN_2_2_99 TRUE)
else(EMBED_OPENBABEL)