PageRenderTime 135ms CodeModel.GetById 63ms app.highlight 1ms RepoModel.GetById 70ms app.codeStats 0ms

/src/CMakeLists.osx.txt

http://github.com/tomahawk-player/tomahawk
Plain Text | 61 lines | 53 code | 8 blank | 0 comment | 0 complexity | 5ac641cd5ac2a2bb6c4ec3020426c99e MD5 | raw file
 1SET( TOMAHAWK_LIBRARIES tomahawklib )
 2
 3SET( OS_SPECIFIC_LINK_LIBRARIES
 4    ${OS_SPECIFIC_LINK_LIBRARIES}
 5    ${COREAUDIO_LIBRARY}
 6    ${COREFOUNDATION_LIBRARY}
 7
 8    crypto
 9    SPMediaKeyTap
10
11    /System/Library/Frameworks/AppKit.framework
12    /System/Library/Frameworks/Carbon.framework
13    /System/Library/Frameworks/DiskArbitration.framework
14    /System/Library/Frameworks/Foundation.framework
15    /System/Library/Frameworks/IOKit.framework
16)
17
18
19if (APPLE)
20#  find_library(GROWL Growl)
21  option(ENABLE_SPARKLE "Sparkle updating" ON)
22  find_library(SPARKLE Sparkle)
23  if (ENABLE_SPARKLE AND SPARKLE)
24    set(HAVE_SPARKLE ON)
25    set( OS_SPECIFIC_LINK_LIBRARIES ${OS_SPECIFIC_LINK_LIBRARIES} ${SPARKLE} )
26  endif(ENABLE_SPARKLE AND SPARKLE)
27  # Uses Darwin kernel version.
28  # 9.8.0  -> 10.5/Leopard
29  # 10.4.0 -> 10.6/Snow Leopard
30  # 11.x.x -> Lion
31  string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${CMAKE_HOST_SYSTEM_VERSION})
32  if (DARWIN_VERSION GREATER 10)
33    SET(LION 1)
34  elseif (DARWIN_VERSION GREATER 9)
35    SET(SNOW_LEOPARD 1)
36  elseif (DARWIN_VERSION GREATER 8)
37    SET(LEOPARD 1)
38  endif (DARWIN_VERSION GREATER 10)
39
40# Use two different sparkle update tracks for debug and release
41# We have to change the URL in the Info.plist file :-/
42  FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
43  STRING( REPLACE "TOMAHAWK_VERSION"
44              ${TOMAHAWK_VERSION}
45              edited_plist # save in this variable
46              "${plist}" # from the contents of this var
47          )
48  # Disable non-release sparkle for now. We haven't used it yet.
49#  IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
50#    STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
51#              "http://download.tomahawk-player.org/sparkle-debug"  #replace with debug url
52#              edited_plist # save in this variable
53#              "${edited_plist}" # from the contents of this var
54#          )
55#  ENDIF()
56  FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
57
58  FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
59    DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/Resources")
60
61endif (APPLE)