[Cmake-commits] CMake branch, master, updated. b461a687865197384b6986eb21c425a76c35a1d0
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Mar 8 13:51:52 EST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via b461a687865197384b6986eb21c425a76c35a1d0 (commit)
from a61c5ab6e59a458ad34383e64d0679a7fe898c61 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b461a687865197384b6986eb21c425a76c35a1d0
commit b461a687865197384b6986eb21c425a76c35a1d0
Author: Bill Hoffman <bill.hoffman at kitware.com>
Date: Mon Mar 8 12:38:15 2010 -0500
Fix Qt with OpenGL on the Mac.
diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake
index 1331f41..1c5293d 100644
--- a/Modules/Qt4ConfigDependentSettings.cmake
+++ b/Modules/Qt4ConfigDependentSettings.cmake
@@ -63,7 +63,21 @@ 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})
-----------------------------------------------------------------------
Summary of changes:
Modules/Qt4ConfigDependentSettings.cmake | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list