From f8c22291ed70a6e0713ace978ce0272105b9e7dd Mon Sep 17 00:00:00 2001 From: Chocobozzz 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