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

 # ---------------------------------------
 # Define qhull executables linked to qhullstatic library
 # ---------------------------------------
@@ -320,3 +357,35 @@
 install(FILES ${road_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/road)
 
 install(DIRECTORY html/ DESTINATION ${DOC_INSTALL_DIR})

         qhull rbox qconvex qdelaunay qvoronoi qhalf
         user_eg user_eg2 user_eg3
 )
@@ -188,17 +188,34 @@
     COMPILE_DEFINITIONS "qh_QHpointer"
     VERSION ${qhull_VERSION})
 
