QTfrontend/CMakeLists.txt
changeset 5879 42cf124c305b
parent 5808 84a075cea647
child 5963 c24fdd9a0458
--- a/QTfrontend/CMakeLists.txt	Mon Sep 12 18:53:28 2011 +0200
+++ b/QTfrontend/CMakeLists.txt	Mon Sep 12 21:51:14 2011 +0400
@@ -12,6 +12,16 @@
 find_package(Qt4 REQUIRED)
 include(${QT_USE_FILE})
 
+# Check if we need zlib
+check_library_exists(${QT_QTCORE_LIBRARY} inflateInit2_ ${QT_LIBRARY_DIR} QT_PROVIDES_ZLIB_FUNCTIONS)
+
+if(NOT QT_PROVIDES_ZLIB_FUNCTIONS)
+    find_package(ZLIB REQUIRED)
+
+    set(HW_LINK_LIBS ${ZLIB_LIBRARIES} ${HW_LINK_LIBS})
+endif()
+
+
 # Configure for SDL
 find_package(SDL REQUIRED)
 find_package(SDL_mixer REQUIRED)
@@ -216,7 +226,7 @@
 
 if(APPLE)
     set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
-    set(HW_LINK_LIBS IOKit)
+    set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS})
 
     if(NOT NOAUTOUPDATE)
         find_package(Sparkle)