From 9afb2cbbacbc788de8372e6c0a2dd60585f0e947 Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Mon, 16 Jan 2012 16:53:29 +0100 Subject: [PATCH] Fix for building qt-components on Mac OS X. Master branch. --- telldus-gui/3rdparty/qt-components-desktop.cmake | 11 ++++++++--- telldus-gui/Plugins/QML/CMakeLists.txt | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/telldus-gui/3rdparty/qt-components-desktop.cmake b/telldus-gui/3rdparty/qt-components-desktop.cmake index 5018f34f..ff7deaba 100644 --- a/telldus-gui/3rdparty/qt-components-desktop.cmake +++ b/telldus-gui/3rdparty/qt-components-desktop.cmake @@ -35,13 +35,18 @@ ENDFOREACH(_FILE) QT4_WRAP_CPP( MOC_SRCS ${HDRS} ) QT4_AUTOMOC ( ${SRCS} ) +SET(LIBRARIES ${QT_LIBRARIES}) + +IF (APPLE) + FIND_LIBRARY(CARBON_LIBRARY Carbon) + LIST(APPEND LIBRARIES ${CARBON_LIBRARY}) +ENDIF () + ADD_LIBRARY(styleplugin SHARED ${SRCS} ${MOC_SRCS} ) -TARGET_LINK_LIBRARIES( styleplugin ${QT_LIBRARIES} ) - - +TARGET_LINK_LIBRARIES( styleplugin ${LIBRARIES} ) IF (WIN32) SET_TARGET_PROPERTIES(styleplugin PROPERTIES diff --git a/telldus-gui/Plugins/QML/CMakeLists.txt b/telldus-gui/Plugins/QML/CMakeLists.txt index 719ec69e..d008a815 100644 --- a/telldus-gui/Plugins/QML/CMakeLists.txt +++ b/telldus-gui/Plugins/QML/CMakeLists.txt @@ -26,6 +26,8 @@ INCLUDE( ../TelldusCenterPlugin.cmake NO_POLICY_SCOPE ) IF (WIN32) SET(QT_COMPONENTS_OUTPUT_DIR "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/Plugins/declarative") +ELSEIF (APPLE) + SET(QT_COMPONENTS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/TelldusCenter.app/Contents/Plugins/declarative") ELSE() SET(QT_COMPONENTS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/TelldusCenter/Plugins/declarative") ENDIF()