On Mon, Mar 1, 2010 at 9:26 PM, Greg Landrum <[email protected]> wrote:
> On Mon, Mar 1, 2010 at 11:24 AM, Gianluca Sforna <[email protected]> wrote:
>> Sorry for resurrecting this topic, but I just realized the Q4 2009
>> release tarball do not compile out of the box due to the previously
>> discussed PYTHON_PATH/PYTHON_DIR trick.
>
> wow, the only thing better than making things work across platforms is
> making them work across versions of the system you are using to make
> them work across platforms. :-S

Yeah, sounds bad...


> 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})

Cheers

G.

-- 
Gianluca Sforna

http://morefedora.blogspot.com
http://www.linkedin.com/in/gianlucasforna

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to