 +    VERSION ${qhull_VERSION} 
 +    COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
 +
-+target_link_libraries(${qhull_STATIC} m)
-+target_link_libraries(${qhull_STATIC_DEBUG} m)
-+target_link_libraries(${qhull_STATICP} m)
-+target_link_libraries(${qhull_STATICP_DEBUG} m)
++if(UNIX)
++  target_link_libraries(${qhull_STATIC} m)
++  target_link_libraries(${qhull_STATIC_DEBUG} m)
++  target_link_libraries(${qhull_STATICP} m)
++  target_link_libraries(${qhull_STATICP_DEBUG} m)
++endif(UNIX)
 +
  # ---------------------------------------
  # Define C++ static library qhullcpp (qh_QHpointer)
  # ---------------------------------------
-@@ -224,6 +255,12 @@
+@@ -224,6 +259,12 @@
      COMPILE_DEFINITIONS "qh_QHpointer"
      VERSION ${qhull_VERSION})
  

+    COMPILE_FLAGS ${CMAKE_CXX_FLAGS_DEBUG}
+    VERSION ${qhull_VERSION})
+
+target_link_libraries(${qhull_SHARED} m)
+target_link_libraries(${qhull_SHARED_DEBUG} m)
 
 if(UNIX)
     if(APPLE)

--- qhull-2011.1/CMakeLists.txt	2011-04-17 17:38:33.000000000 -0700
+++ qhull-2011.1/CMakeLists.txt	2011-04-25 17:17:13.000000000 -0700
@@ -10,7 +10,7 @@
 # $Id: //main/2011/qhull/CMakeLists.txt#9 $$Change: 1373 $
 # $DateTime: 2011/04/17 22:20:48 $$Author: bbarber $
