Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Schmidt <dev@dominik-schmidt.de>2018-10-10 02:11:48 +0300
committerDominik Schmidt <domme@tomahawk-player.org>2018-10-11 14:09:35 +0300
commitf8e7df42a80c69c39070447066d047dcf8c0b9f6 (patch)
tree1005bc86da5869e1f918df395b3eb1fcf48980ac
parentba2c4d1b211bb0acdb56260371d35f6286e26295 (diff)
Simplify Sparkle handling in CMake
-rw-r--r--cmake/modules/FindSparkle.cmake8
-rw-r--r--src/gui/CMakeLists.txt15
-rw-r--r--src/libsync/CMakeLists.txt8
3 files changed, 14 insertions, 17 deletions
diff --git a/cmake/modules/FindSparkle.cmake b/cmake/modules/FindSparkle.cmake
index 2c1e1944d..2b0c75b95 100644
--- a/cmake/modules/FindSparkle.cmake
+++ b/cmake/modules/FindSparkle.cmake
@@ -2,8 +2,7 @@
#
# Once done this will define
# SPARKLE_FOUND - system has Sparkle
-# SPARKLE_INCLUDE_DIR - the Sparkle include directory
-# SPARKLE_LIBRARY - The library needed to use Sparkle
+# SPARKLE_LIBRARY - The framework needed to use Sparkle
# Copyright (c) 2009, Vittorio Giovara <vittorio.giovara@gmail.com>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -15,9 +14,8 @@
include(FindPackageHandleStandardArgs)
-find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
find_library(SPARKLE_LIBRARY NAMES Sparkle)
-find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
-mark_as_advanced(SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
+find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_LIBRARY)
+mark_as_advanced(SPARKLE_LIBRARY)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 3648981e3..3bda87951 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -137,9 +137,16 @@ IF( APPLE )
list(APPEND client_SRCS systray.mm)
if(SPARKLE_FOUND)
- # Define this, we need to check in updater.cpp
- add_definitions( -DHAVE_SPARKLE )
- list(APPEND updater_SRCS updater/sparkleupdater_mac.mm updater/sparkleupdater.h)
+ # Define this, we need to check in updater.cpp
+ add_definitions(-DHAVE_SPARKLE)
+ 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()
@@ -268,7 +275,7 @@ else()
endif()
add_library(updater STATIC ${updater_SRCS})
-target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml)
+target_link_libraries(updater ${synclib_NAME} ${updater_DEPS} Qt5::Widgets Qt5::Network Qt5::Xml)
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
index e78f00920..a0a58fbd8 100644
--- a/src/libsync/CMakeLists.txt
+++ b/src/libsync/CMakeLists.txt
@@ -16,10 +16,6 @@ IF(${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
account.cpp
bandwidthmanager.cpp
@@ -131,10 +127,6 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
)
else()
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()