fail if sparkle not found consciously
authorkoda
Wed, 06 Mar 2013 01:28:21 +0100
changeset 8659 e49056d3aba1
parent 8657 3a957233f459
child 8660 6370e545fd5f
fail if sparkle not found consciously
CMakeLists.txt
QTfrontend/CMakeLists.txt
tools/CMakeLists.txt
--- a/CMakeLists.txt	Wed Mar 06 01:24:59 2013 +0100
+++ b/CMakeLists.txt	Wed Mar 06 01:28:21 2013 +0100
@@ -29,8 +29,10 @@
 
 option(BUILD_ENGINE_LIBRARY "Enable hwengine library [default: off]" OFF)
 option(ANDROID "Enable Android build [default: off]" OFF)
-option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF)
 option(MINIMAL_FLAGS "Respect system flags as much as possible [default: off]" OFF)
+if(APPLE)
+    option(NOAUTOUPDATE "Disable OS X Sparkle update checking" OFF)
+endif()
 
 set(FPFLAGS "" CACHE STRING "Additional Freepascal flags")
 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
--- a/QTfrontend/CMakeLists.txt	Wed Mar 06 01:24:59 2013 +0100
+++ b/QTfrontend/CMakeLists.txt	Wed Mar 06 01:28:21 2013 +0100
@@ -175,6 +175,8 @@
             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()
     endif()
 endif()
--- a/tools/CMakeLists.txt	Wed Mar 06 01:24:59 2013 +0100
+++ b/tools/CMakeLists.txt	Wed Mar 06 01:28:21 2013 +0100
@@ -15,8 +15,7 @@
     find_package(SDL_mixer REQUIRED)
     find_package(OGGVORBIS REQUIRED)
     if(NOT NOAUTOUPDATE)
-        #needed for SPARKLE_FOUND variable
-        find_package(Sparkle QUIET)
+        find_package(Sparkle) #needed for SPARKLE_FOUND variable
         #needed because the 'if' clause in the script prints silly policy warnings
         if(${SPARKLE_FOUND})
             set(SPARKLE_FOUND 1)