summarylogtreecommitdiffstats
path: root/qtdbus.patch
blob: fe9c1661d922d13923bca11d34951a4de6831100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
From f8c22291ed70a6e0713ace978ce0272105b9e7dd Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Fri, 7 Dec 2018 15:54:56 +0100
Subject: [PATCH] Revert "Fixes for compiling against qt5 on mac"

This reverts commit 453270c8b5015f39a44fd34c659e811c6b8048cf.
---
 3rdparty/libmygpo-qt5/src/CMakeLists.txt |  3 ++-
 3rdparty/qocoa/CMakeLists.txt            |  2 +-
 CMakeLists.txt                           |  6 ++++++
 dist/macdeploy.py                        | 23 +++++++----------------
 ext/clementine-tagreader/CMakeLists.txt  |  4 ++--
 ext/libclementine-common/CMakeLists.txt  |  5 +++--
 src/CMakeLists.txt                       | 15 +++------------
 7 files changed, 24 insertions(+), 34 deletions(-)

diff --git a/3rdparty/libmygpo-qt5/src/CMakeLists.txt b/3rdparty/libmygpo-qt5/src/CMakeLists.txt
index 5098160aa..c15771c3e 100644
--- a/3rdparty/libmygpo-qt5/src/CMakeLists.txt
+++ b/3rdparty/libmygpo-qt5/src/CMakeLists.txt
@@ -84,4 +84,5 @@ QT_WRAP_CPP(LIBMYGPO_QT_MOC_SRC ${LIBMYGPO_QT_MOC_H} )
 
 add_library( ${MYGPO_QT_TARGET_NAME} STATIC ${LIBMYGPO_QT_SRC} ${LIBMYGPO_QT_MOC_SRC} )
 
-target_link_libraries( ${MYGPO_QT_TARGET_NAME} ${QJSON_LIBRARIES} Qt5::Core Qt5::Network )
+target_link_libraries( ${MYGPO_QT_TARGET_NAME} ${QJSON_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY}  )
+target_link_libraries( ${MYGPO_QT_TARGET_NAME} Qt5::Core Qt5::Network )
diff --git a/3rdparty/qocoa/CMakeLists.txt b/3rdparty/qocoa/CMakeLists.txt
index a52ee2e24..b3b7fa4aa 100644
--- a/3rdparty/qocoa/CMakeLists.txt
+++ b/3rdparty/qocoa/CMakeLists.txt
@@ -29,4 +29,4 @@ endif()
 add_library(Qocoa STATIC
     ${SOURCES} ${MOC_SOURCES} ${RESOURCES_SOURCES}
 )
-target_link_libraries(Qocoa Qt5::Widgets Qt5::MacExtras)
+target_link_libraries(Qocoa ${QT_LIBRARIES})
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8130577e..dbc2c96e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,12 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
   set(FREEBSD ON)
 endif()
 
+if(APPLE)
+  if(NOT QT_MAC_USE_COCOA)
+    message(FATAL_ERROR "Cocoa support is required")
+  endif(NOT QT_MAC_USE_COCOA)
+endif(APPLE)
+
 set(OpenGL_GL_PREFERENCE LEGACY)
 find_package(OpenGL)
 if(OPENGL_FOUND)
diff --git a/dist/macdeploy.py b/dist/macdeploy.py
index 08fa5ca7e..3371eaed7 100755
--- a/dist/macdeploy.py
+++ b/dist/macdeploy.py
@@ -30,11 +30,6 @@ FRAMEWORK_SEARCH_PATH = [
     os.path.join(os.environ['HOME'], 'Library/Frameworks')
 ]
 
-STRIP_PREFIX = [
-    '@@HOMEBREW_PREFIX@@/opt/qt5/lib/',
-    '@@HOMEBREW_CELLAR@@/qt5/5.8.0_1/lib/',
-]
-
 LIBRARY_SEARCH_PATH = ['/target', '/target/lib', '/usr/local/lib', '/sw/lib']
 
 GSTREAMER_PLUGINS = [
@@ -59,7 +54,7 @@ GSTREAMER_PLUGINS = [
     'libgstapetag.so',
     'libgstasf.so',
     'libgstaudioparsers.so',
-    #'libgstfaac.so',
+    'libgstfaac.so',
     'libgstfaad.so',
     'libgstflac.so',
     'libgstid3demux.so',
@@ -99,16 +94,16 @@ GSTREAMER_SEARCH_PATH = [
 ]
 
 QT_PLUGINS = [
-    #'accessible/libqtaccessiblewidgets.dylib',
-    #'codecs/libqcncodecs.dylib',
-    #'codecs/libqjpcodecs.dylib',
-    #'codecs/libqkrcodecs.dylib',
-    #'codecs/libqtwcodecs.dylib',
+    'accessible/libqtaccessiblewidgets.dylib',
+    'codecs/libqcncodecs.dylib',
+    'codecs/libqjpcodecs.dylib',
+    'codecs/libqkrcodecs.dylib',
+    'codecs/libqtwcodecs.dylib',
     'iconengines/libqsvgicon.dylib',
     'imageformats/libqgif.dylib',
     'imageformats/libqico.dylib',
     'imageformats/libqjpeg.dylib',
-    #'imageformats/libqmng.dylib',
+    'imageformats/libqmng.dylib',
     'imageformats/libqsvg.dylib',
 ]
 QT_PLUGINS_SEARCH_PATH = [
@@ -211,10 +206,6 @@ def GetBrokenLibraries(binary):
 
 
 def FindFramework(path):
-  for prefix in STRIP_PREFIX:
-    if path.startswith(prefix):
-      path = path[len(prefix):]
-      break
   for search_path in FRAMEWORK_SEARCH_PATH:
     abs_path = os.path.join(search_path, path)
     if os.path.exists(abs_path):
diff --git a/ext/clementine-tagreader/CMakeLists.txt b/ext/clementine-tagreader/CMakeLists.txt
index 855e390cf..d846efecd 100644
--- a/ext/clementine-tagreader/CMakeLists.txt
+++ b/ext/clementine-tagreader/CMakeLists.txt
@@ -29,8 +29,8 @@ target_link_libraries(clementine-tagreader
   ${TAGLIB_LIBRARIES}
   libclementine-common
   libclementine-tagreader
-  Qt5::Core
-  Qt5::Network
+  ${QT_QTCORE_LIBRARY}
+  ${QT_QTNETWORK_LIBRARY}
   z
 )
 
diff --git a/ext/libclementine-common/CMakeLists.txt b/ext/libclementine-common/CMakeLists.txt
index 694836c9e..200f73c96 100644
--- a/ext/libclementine-common/CMakeLists.txt
+++ b/ext/libclementine-common/CMakeLists.txt
@@ -35,8 +35,9 @@ add_library(libclementine-common STATIC
 )
 
 target_link_libraries(libclementine-common
-  Qt5::Core
-  Qt5::Network
+  ${QT_LIBRARIES}
   ${TAGLIB_LIBRARIES}
   ${CMAKE_THREAD_LIBS_INIT}
 )
+
+target_link_libraries(libclementine-common Qt5::Core Qt5::Network)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 88dff3c20..76654a4c3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1244,22 +1244,13 @@ target_link_libraries(clementine_lib
   libclementine-common
   libclementine-tagreader
   libclementine-remote
-
-  Qt5::Concurrent
-  Qt5::Core
-  Qt5::Network
-  Qt5::OpenGL
-  Qt5::OpenGL
-  Qt5::Sql
-  Qt5::Widgets
-  Qt5::Xml
-
   ${TAGLIB_LIBRARIES}
   ${MYGPOQT5_LIBRARIES}
   ${CHROMAPRINT_LIBRARIES}
   ${GOBJECT_LIBRARIES}
   ${GLIB_LIBRARIES}
   ${GIO_LIBRARIES}
+  ${QT_LIBRARIES}
   ${GSTREAMER_BASE_LIBRARIES}
   ${GSTREAMER_LIBRARIES}
   ${GSTREAMER_APP_LIBRARIES}
@@ -1270,9 +1261,8 @@ target_link_libraries(clementine_lib
   ${QTIOCOMPRESSOR_LIBRARIES}
   ${CMAKE_THREAD_LIBS_INIT}
   ${SQLITE_LIBRARIES}
-
-  Qocoa
   z
+  Qocoa
 )
 
 if(HAVE_VISUALISATIONS)
@@ -1362,6 +1352,7 @@ if (WIN32)
     ${QTSPARKLE_LIBRARIES}
     tinysvcmdns
     dsound
+    ${QT_QTGUI_LIBRARY}
   )
 endif (WIN32)
 
-- 
2.19.2