diff --git a/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt b/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt index 6c706f096a9..3039e426de5 100644 --- a/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt +++ b/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt @@ -64,7 +64,12 @@ ENDIF(QNANHIBIT) ADD_DEFINITIONS(-DTEEM_ZLIB=1) ADD_LIBRARY(ITKNrrdIO ${nrrdio_SRCS} ) -TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES}) + +IF(UNIX) + TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES} m) +ELSE(UNIX) + TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES}) +ENDIF(UNIX) IF(ITK_LIBRARY_PROPERTIES) SET_TARGET_PROPERTIES(ITKNrrdIO PROPERTIES ${ITK_LIBRARY_PROPERTIES})