QTfrontend/CMakeLists.txt
changeset 8691 a59b35e3ad8f
parent 8688 88a6114a318c
child 8833 c13ebed437cb
child 9198 48b92ff6238f
--- a/QTfrontend/CMakeLists.txt	Fri Mar 08 08:06:13 2013 -0500
+++ b/QTfrontend/CMakeLists.txt	Fri Mar 08 08:07:30 2013 -0500
@@ -166,16 +166,13 @@
                          util/platform/M3InstallController.m
                          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_msg(Sparkle NOAUTOUPDATE "Autoupdater will not be built.")
+    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})
     endif()
 endif()