cmake_modules/FindSparkle.cmake
author koda
Fri, 09 Nov 2012 14:32:54 +0000
branchwebgl
changeset 7997 7dff08baf9e3
parent 7933 223b3a195474
child 8657 3a957233f459
permissions -rw-r--r--
add FindGLEW.cmake module
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)
7933
223b3a195474 many osx sparkle fixes
koda
parents: 2395
diff changeset
    27
   if (NOT SPARKLE_FIND_QUIETLY)
2261
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 ()
7933
223b3a195474 many osx sparkle fixes
koda
parents: 2395
diff changeset
    31
   if (SPARKLE_FIND_REQUIRED)
2261
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 ()
7933
223b3a195474 many osx sparkle fixes
koda
parents: 2395
diff changeset
    34
      if (NOT SPARKLE_FIND_QUIETLY)
2395
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