Fix python lib linking on MacOS X
authorMichel Zou <xantares09@hotmail.com>
Thu, 6 Sep 2012 07:26:04 +0000 (09:26 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 6 Sep 2012 07:26:04 +0000 (09:26 +0200)
bindings/CMakeLists.txt

index 606e44b..acf4d11 100644 (file)
@@ -15,8 +15,8 @@ if(PYTHON_BINDINGS AND SWIG_FOUND AND PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
 
     # do not link python modules on debian
     # http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html
-    if ( NOT EXISTS "/etc/debian_version" )
-        swig_link_libraries ( ftdi1 ${PYTHON_LIBRARIES} )
+    if ( NOT UNIX OR ( UNIX AND NOT EXISTS "/etc/debian_version" ) )
+      swig_link_libraries ( ftdi1 ${PYTHON_LIBRARIES} )
     endif ()
 
     execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print( '%d.%d' % ( sys.version_info[0], sys.version_info[1] ) )"