cmake_modules/FindSparkle.cmake
author Zorg <zorgiepoo@gmail.com>
Wed, 08 Jun 2011 03:36:54 -0400
changeset 5229 148d581b17ab
parent 2395 d01d3bf3e1de
child 7933 223b3a195474
permissions -rw-r--r--
Attempt to fix issue #125. The password pop-up doesn't appear every time when going into the official server anymore, now it only does it when the password is blank. If a user enters an invalid password, the password is set blank to avoid the user going back to the official server just to be rejected. When entering an invalid password, the unknown error dialog doesn't show up anymore, but the connection lost to server one still does. This fixes the bug where the user would be spammed with error messages. The user can also now change his password in the settings page.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2395
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     1
### Hedgewars
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     2
2395
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     3
# - Try to find the Sparkle framework
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     4
# Once done this will define
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
     5
#
2395
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     6
#  SPARKLE_FOUND - system has Sparkle
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     7
#  SPARKLE_INCLUDE_DIR - the Sparkle include directory
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     8
#  SPARKLE_LIBRARY - The library needed to use Sparkle
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
     9
# Copyright (c) 2009, Vittorio Giovara, <vittorio.giovara@gmail.com>
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    10
#
2395
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    11
# Redistribution and use is allowed according to the terms of a Creative Commons license.
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    12
# For details see http://creativecommons.org/licenses/by-sa/3.0/
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    13
# original version of this module was derived from Richard Laerkaeng, <richard@goteborg.utfors.se>
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    14
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    15
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    16
include (CheckLibraryExists)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    17
find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    18
find_library(SPARKLE_LIBRARY NAMES Sparkle)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    19
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    20
if (SPARKLE_INCLUDE_DIR AND SPARKLE_LIBRARY)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    21
   set(SPARKLE_FOUND TRUE)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    22
else ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    23
   set(SPARKLE_FOUND FALSE)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    24
endif ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    25
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    26
if (SPARKLE_FOUND)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    27
   if (NOT Sparkle_FIND_QUIETLY)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    28
      message(STATUS "Found Sparkle: ${SPARKLE_LIBRARY}")
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    29
   endif ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    30
else ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    31
   if (Sparkle_FIND_REQUIRED)
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    32
      message(FATAL_ERROR "Could NOT find Sparkle framework")
2395
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    33
   else ()
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    34
      if (NOT Sparkle_FIND_QUIETLY)
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    35
         message(STATUS "Could NOT find Sparkle framework, autoupdate feature will be disabled")
d01d3bf3e1de makes the updater optional at compile time
koda
parents: 2261
diff changeset
    36
      endif()
2261
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    37
   endif ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    38
endif ()
57e99c908e7c a lot of stuff:
koda
parents:
diff changeset
    39