macOS: Require Sparkle 1 for now.
The Sparkle project recently released Sparkle 2.0.0, which deprecates the version 1 API. Add version discovery to FindSparkle.cmake and require version 1 until we add support for the new API. Ping #17861.
This commit is contained in:
parent
5074b4d717
commit
a6e24a6234
|
@ -1244,7 +1244,7 @@ if(BUILD_wireshark)
|
||||||
endif()
|
endif()
|
||||||
set(QT_FOUND ON)
|
set(QT_FOUND ON)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
ws_find_package(Sparkle ENABLE_SPARKLE HAVE_SOFTWARE_UPDATE)
|
ws_find_package(Sparkle ENABLE_SPARKLE HAVE_SOFTWARE_UPDATE 1 EXACT)
|
||||||
endif()
|
endif()
|
||||||
if(Qt${qtver}Multimedia_FOUND)
|
if(Qt${qtver}Multimedia_FOUND)
|
||||||
set(QT_MULTIMEDIA_LIB 1)
|
set(QT_MULTIMEDIA_LIB 1)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
# SPARKLE_FOUND - True if we found Sparkle
|
# SPARKLE_FOUND - True if we found Sparkle
|
||||||
# SPARKLE_INCLUDE_DIRS - Path to Sparkle.h, empty if not found
|
# SPARKLE_INCLUDE_DIRS - Path to Sparkle.h, empty if not found
|
||||||
# SPARKLE_LIBRARIES - Path to Sparkle.framework, empty if not found
|
# SPARKLE_LIBRARIES - Path to Sparkle.framework, empty if not found
|
||||||
|
# SPARKLE_VERSION - Sparkle framework bundle version
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
@ -18,7 +19,25 @@ find_library(SPARKLE_LIBRARY NAMES Sparkle
|
||||||
HINTS ${USR_LOCAL_HINT} ${HOMEBREW_HINT}
|
HINTS ${USR_LOCAL_HINT} ${HOMEBREW_HINT}
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
|
# https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
|
||||||
|
find_file(_info_plist Info.plist
|
||||||
|
${SPARKLE_LIBRARY}/Resources
|
||||||
|
${SPARKLE_LIBRARY}/Versions/Current/Resources
|
||||||
|
${SPARKLE_LIBRARY}/Versions/A/Resources
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_info_plist)
|
||||||
|
execute_process(COMMAND defaults read ${_info_plist} CFBundleVersion
|
||||||
|
OUTPUT_VARIABLE SPARKLE_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Sparkle
|
||||||
|
REQUIRED_VARS SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY
|
||||||
|
VERSION_VAR SPARKLE_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
if(SPARKLE_FOUND)
|
if(SPARKLE_FOUND)
|
||||||
set(SPARKLE_LIBRARIES ${SPARKLE_LIBRARY} )
|
set(SPARKLE_LIBRARIES ${SPARKLE_LIBRARY} )
|
||||||
|
|
Loading…
Reference in New Issue