cmake_modules/FindSparkle.cmake
author nemo
Sun, 11 Sep 2011 08:54:21 -0400
changeset 5848 103e3a80daa6
parent 2395 d01d3bf3e1de
child 7933 223b3a195474
permissions -rw-r--r--
Try the same offsetting as X - I think it helps w/ mikade's Space Invasion camera problem
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