mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
Simplify Sparkle handling in CMake
This commit is contained in:
parent
6962cbf582
commit
a50c665051
3 changed files with 14 additions and 17 deletions
|
@ -2,8 +2,7 @@
|
||||||
#
|
#
|
||||||
# Once done this will define
|
# Once done this will define
|
||||||
# SPARKLE_FOUND - system has Sparkle
|
# SPARKLE_FOUND - system has Sparkle
|
||||||
# SPARKLE_INCLUDE_DIR - the Sparkle include directory
|
# SPARKLE_LIBRARY - The framework needed to use Sparkle
|
||||||
# SPARKLE_LIBRARY - The library needed to use Sparkle
|
|
||||||
# Copyright (c) 2009, Vittorio Giovara <vittorio.giovara@gmail.com>
|
# Copyright (c) 2009, Vittorio Giovara <vittorio.giovara@gmail.com>
|
||||||
#
|
#
|
||||||
# Distributed under the OSI-approved BSD License (the "License");
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
@ -15,9 +14,8 @@
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
|
|
||||||
find_library(SPARKLE_LIBRARY NAMES Sparkle)
|
find_library(SPARKLE_LIBRARY NAMES Sparkle)
|
||||||
|
|
||||||
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
|
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_LIBRARY)
|
||||||
mark_as_advanced(SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
|
mark_as_advanced(SPARKLE_LIBRARY)
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,15 @@ IF( APPLE )
|
||||||
|
|
||||||
if(SPARKLE_FOUND AND BUILD_UPDATER)
|
if(SPARKLE_FOUND AND BUILD_UPDATER)
|
||||||
# Define this, we need to check in updater.cpp
|
# Define this, we need to check in updater.cpp
|
||||||
add_definitions( -DHAVE_SPARKLE )
|
add_definitions(-DHAVE_SPARKLE)
|
||||||
list(APPEND updater_SRCS updater/sparkleupdater_mac.mm updater/sparkleupdater.h)
|
list(APPEND updater_SRCS updater/sparkleupdater_mac.mm updater/sparkleupdater.h)
|
||||||
|
list(APPEND updater_DEPS ${SPARKLE_LIBRARY})
|
||||||
|
|
||||||
|
# Sparkle.framework is installed from here because macdeployqt's CopyFramework breaks on this bundle
|
||||||
|
# as its logic is tightly tailored around Qt5 frameworks
|
||||||
|
install(DIRECTORY "${SPARKLE_LIBRARY}"
|
||||||
|
DESTINATION "${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks" USE_SOURCE_PERMISSIONS)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -309,7 +316,7 @@ endif()
|
||||||
|
|
||||||
IF(BUILD_UPDATER)
|
IF(BUILD_UPDATER)
|
||||||
add_library(updater STATIC ${updater_SRCS})
|
add_library(updater STATIC ${updater_SRCS})
|
||||||
target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Svg Qt5::Network Qt5::Xml)
|
target_link_libraries(updater ${synclib_NAME} ${updater_DEPS} Qt5::Widgets Qt5::Svg Qt5::Network Qt5::Xml)
|
||||||
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,6 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
|
||||||
)
|
)
|
||||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
|
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|OpenBSD")
|
||||||
|
|
||||||
if(SPARKLE_FOUND AND NOT BUILD_LIBRARIES_ONLY)
|
|
||||||
list (APPEND OS_SPECIFIC_LINK_LIBRARIES ${SPARKLE_LIBRARY})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(libsync_SRCS
|
set(libsync_SRCS
|
||||||
account.cpp
|
account.cpp
|
||||||
wordlist.cpp
|
wordlist.cpp
|
||||||
|
@ -141,10 +137,6 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||||
if (SPARKLE_FOUND)
|
|
||||||
install(DIRECTORY "${SPARKLE_LIBRARY}"
|
|
||||||
DESTINATION "${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks" USE_SOURCE_PERMISSIONS)
|
|
||||||
endif (SPARKLE_FOUND)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue