[KDE/Mac] Boost.Python and Cmake on Mac
geoff at geoffhutchison.net
Thu Apr 17 21:12:10 CEST 2008
I'm currently working with a KDE-Edu project (Kalzium) and a related
project (Avogadro) on embedded Python scripting. We're using
Boost.Python, so we also use the KDE-Edu FindBoostPython.cmake module:
I can't get our Boost.Python code to work because Cmake can't find it
anymore. I looked through the module and found several problems
(below). However, I don't know enough about Cmake to fix this myself.
If someone can give me pointers, I'll fix this up.
1) On the Mac, you usually have to install Boost separately (e.g.,
from source). At the moment, I have /usr/local/include/boost-1_34_1
for headers. I do not see any sort of pkg-config file which would
indicate how you would find this (other than looking in various
include directories for names starting with boost*).
This prevents this line from working in FindBoostPython.cmake:
Everything else in the Cmake module relies on this test. Is there a
good way to look for this? It seems like it'd need some sort of
wildcard include search.
2) The Python include and library directories in
FindBoostPython.cmake look Linux-only. I'm running Leopard, which
does links in /usr/include where necessary. I don't know if this is
true of Tiger.
I have Python headers in /System/Library/Frameworks/Python.framework/
Headers and /usr/include/python2.5
I have Python libraries in /usr/lib/python.dylib (etc.)
3) The PYTHON_LIBS variable is version and platform dependent.
I have /usr/local/lib/libboost_python-mt-1_34_1. (Note that there's no
gcc in this, and the 1_34 and 1_35 releases are not listed in the
current FindBoostPython.cmake module.
Thanks in advance for any help!
More information about the kde-mac