\r
 ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES} )\r
 #TODO this is not working out of the box (on the first time)\r
-IF(WIN32)\r
+IF(UNIX)\r
   TARGET_LINK_LIBRARIES(gdcm \r
     gdcmijpeg8 \r
     gdcmijpeg12\r
-    Wsock32.lib\r
   )\r
-ELSE(WIN32)\r
+ELSE(UNIX)\r
   TARGET_LINK_LIBRARIES(gdcm \r
     gdcmijpeg8 \r
     gdcmijpeg12\r
+    Wsock32.lib   #doesn't exist on cygwin\r
   )\r
-ENDIF(WIN32)
\ No newline at end of file
+ENDIF(UNIX)
\ No newline at end of file