Dear Gianluca, On Fri, Mar 5, 2010 at 12:35 AM, Gianluca Sforna <[email protected]> wrote: > >> The useage of PYTHON_INCLUDE_PATH, as you propose below, has been >> deprecated in cmake v2.8. I suppose the correct thing for me to do is >> to add a version check in CMakeLists.txt to detect the older version >> and adjust the variable names accordingly. > > Here is an improved version of the patch, I guess it should work as > you described, but I only tested it in Fedora 12 (cmake 2.6) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index d58237c..dbd17c1 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -34,7 +34,14 @@ if(RDK_BUILD_PYTHON_WRAPPERS) > #------- > # pull in python: > find_package(PythonLibs) > - include_directories(${PYTHON_INCLUDE_DIR}) > + if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) > + include_directories(${PYTHON_INCLUDE_PATH}) > + endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) > + > + if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 8) > + include_directories(${PYTHON_INCLUDE_DIR}) > + endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 8) > + > link_directories(${PYTHON_LIBRARIES}) > find_package(NumPy REQUIRED) > include_directories(${PYTHON_NUMPY_INCLUDE_PATH}) >
Excellent, thanks for the patch! I just checked this in. I've tried it with cmake v2.8 and v2.6 and it seems to work with both. -greg ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

