diff --git a/CMakeLists.txt b/CMakeLists.txt index 60bb5f81a..e3d702e7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,10 @@ if( NOT BUILD_WITH_QT4 ) find_package(Qt5DBus REQUIRED) endif() + if(APPLE) + find_package(Qt5MacExtras REQUIRED) + endif() + if(WIN32) find_package(Qt5WinExtras REQUIRED) endif() @@ -168,13 +172,15 @@ if( NOT BUILD_WITH_QT4 ) qt5_add_translation(${ARGN}) endmacro() - macro(qt_add_dbus_interface) - qt5_add_dbus_interface(${ARGN}) - endmacro() + if( UNIX AND NOT APPLE ) + macro(qt_add_dbus_interface) + qt5_add_dbus_interface(${ARGN}) + endmacro() - macro(qt_add_dbus_adaptor) - qt5_add_dbus_adaptor(${ARGN}) - endmacro() + macro(qt_add_dbus_adaptor) + qt5_add_dbus_adaptor(${ARGN}) + endmacro() + endif() macro(setup_qt) endmacro() diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 2ae749eb9..285cd3d9c 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -441,19 +441,11 @@ IF( APPLE ) mac/FileHelpers.mm widgets/SourceTreePopupDialog_mac.mm ) - if( BUILD_WITH_QT4 ) - list(APPEND libSources - thirdparty/Qocoa/qbutton_mac.mm - thirdparty/Qocoa/qsearchfield_mac.mm - thirdparty/Qocoa/qtoolbartabdialog_mac.mm - ) - else() - list(APPEND libSources - thirdparty/Qocoa/qbutton.cpp - thirdparty/Qocoa/qsearchfield.cpp - thirdparty/Qocoa/qtoolbartabdialog.cpp - ) - endif() + list(APPEND libSources + thirdparty/Qocoa/qbutton_mac.mm + thirdparty/Qocoa/qsearchfield_mac.mm + thirdparty/Qocoa/qtoolbartabdialog_mac.mm + ) SET_SOURCE_FILES_PROPERTIES(utils/TomahawkUtils_Mac.mm PROPERTIES COMPILE_FLAGS "-fvisibility=default") @@ -492,6 +484,9 @@ set_target_properties( qt5_use_modules(tomahawklib Widgets Network Sql WebKitWidgets Concurrent Xml UiTools Svg) +IF(APPLE) + qt5_use_modules(tomahawklib MacExtras) +ENDIF() IF(QCA2_FOUND) LIST(APPEND LINK_LIBRARIES ${QCA2_LIBRARIES} ) diff --git a/src/tomahawk/CMakeLists.txt b/src/tomahawk/CMakeLists.txt index 8c28fe596..45dc696f7 100644 --- a/src/tomahawk/CMakeLists.txt +++ b/src/tomahawk/CMakeLists.txt @@ -167,6 +167,9 @@ SET_TARGET_PROPERTIES(tomahawk_bin qt5_use_modules(tomahawk_bin Core Widgets Network Sql WebKitWidgets) +if(APPLE) + qt5_use_modules(tomahawk_bin MacExtras) +endif() if(WIN32) qt5_use_modules(tomahawk_bin WinExtras) endif()