QTfrontend/CMakeLists.txt
changeset 8686 d303da4568b7
parent 8666 1652c1d9adc8
child 8688 88a6114a318c
--- a/QTfrontend/CMakeLists.txt	Thu Mar 07 10:11:07 2013 +0100
+++ b/QTfrontend/CMakeLists.txt	Thu Mar 07 10:14:12 2013 +0100
@@ -167,15 +167,14 @@
                          util/platform/NSWorkspace_RBAdditions.m
                          )
     if(NOT NOAUTOUPDATE)
-        find_package(Sparkle)
-        if(SPARKLE_FOUND)
-            add_definitions(-DSPARKLE_ENABLED)
-            list(APPEND hwfr_src util/platform/AutoUpdater.cpp
-                                 util/platform/SparkleAutoUpdater.mm)
-            list(APPEND HW_LINK_LIBS ${SPARKLE_LIBRARY})
-        else()
-            message(FATAL_ERROR "Missing Sparkle! Rerun cmake with -DNOAUTOUPDATE=on to disable autoupdating")
-        endif()
+        include(${CMAKE_MODULE_PATH}/utils.cmake)
+        find_package_or_disable(Sparkle NOAUTOUPDATE)
+        add_definitions(-DSPARKLE_ENABLED)
+        list(APPEND hwfr_src util/platform/AutoUpdater.cpp
+                             util/platform/SparkleAutoUpdater.mm)
+        list(APPEND HW_LINK_LIBS ${SPARKLE_LIBRARY})
+    else()
+        message(STATUS "Sparkle autoupdater disabled")
     endif()
 endif()