X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=cmake%2Fmodules%2FQt4ConfigDependentSettings.cmake;h=fba312929cac9b31a226b8bb854ec9f158febe8d;hp=a6b6c3d6d82ab9646dd1f68732bd2c676ecc9708;hb=ff81aaec156b8dc2e12f49286fd69e55f215af29;hpb=d5a8bac7938b44db3a173e9e788502769052dc6f diff --git a/cmake/modules/Qt4ConfigDependentSettings.cmake b/cmake/modules/Qt4ConfigDependentSettings.cmake index a6b6c3d6..fba31292 100644 --- a/cmake/modules/Qt4ConfigDependentSettings.cmake +++ b/cmake/modules/Qt4ConfigDependentSettings.cmake @@ -57,9 +57,9 @@ ELSE(WIN32) # On other platforms, check file extension to know if its static IF(QT_QTCORE_LIBRARY_RELEASE) GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT) - IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) + IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") SET(QT_IS_STATIC 1) - ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) + ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") ENDIF(QT_QTCORE_LIBRARY_RELEASE) IF(QT_QTCORE_LIBRARY_DEBUG) GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT) @@ -77,7 +77,18 @@ ENDIF(WIN32 AND NOT QT_IS_STATIC) # QtOpenGL dependencies QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") -SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) +IF(Q_WS_MAC) +# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL". +# The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the +# linker command. So we need to protect the "-framework foo" as non-separatable strings. +# We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(), +# and then we replace the underscores again with spaces. So we get proper linker commands. Alex + STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") + SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) + STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") +ELSE(Q_WS_MAC) + SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) +ENDIF(Q_WS_MAC) SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) @@ -217,6 +228,7 @@ IF(NOT Q_WS_WIN) ENDIF(_QT_NEED_OPENSSL) ENDIF(NOT Q_WS_WIN) + ## dbus IF(QT_QCONFIG MATCHES "dbus")