diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt
index af2f0f8..0d72e54 100644
--- a/vncviewer/CMakeLists.txt
+++ b/vncviewer/CMakeLists.txt
@@ -41,7 +41,13 @@ endif()
 if(USE_INCLUDED_FLTK)
   target_link_libraries(vncviewer fltk_static)
 endif()
-target_link_libraries(vncviewer rfb network rdr os Xregion fontconfig ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
+
+if (APPLE OR WIN32)
+	target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
+else()
+	target_link_libraries(vncviewer rfb network rdr os Xregion fontconfig ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
+endif()
+
 
 # When building with GnuTLS, librdr depends on ws2_32, so in order to make
 # MinGW happy, we need to put ws2_32 in librdr's target_link_libraries string,
