From 1274ce5bf326ba4557c155994d9d0c94f2d4fe3d Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 8 Mar 2010 12:38:15 -0500 Subject: [PATCH] CMake 2.8.1-rc5 Fix Qt with OpenGL on the Mac. Add .git .bzr and .hg to the list of default CPack ignore directories. Bump RC number Update ChangeLog.manual --- CMakeLists.txt | 2 +- ChangeLog.manual | 4 ++++ Modules/CPack.cmake | 2 +- Modules/Qt4ConfigDependentSettings.cmake | 16 +++++++++++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eb558b1e..93d6c43ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,7 +329,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES) SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 1) -SET(CMake_VERSION_RC 4) +SET(CMake_VERSION_RC 5) # We use odd minor numbers for development versions. # Use a date for the development patch level. diff --git a/ChangeLog.manual b/ChangeLog.manual index 9145d211e..147c263cb 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,3 +1,7 @@ +Changes in CMake 2.8.1 RC 5 +- Fix FindQt4 to work with OpenGL on the mac +- Add .git .bzr and .hg to the list of default CPack ignore directories. + Changes in CMake 2.8.1 RC 4 - CTest: Do not hide test GUI windows (fixes 2.8.0 regression) - Documentation: Clarify CMAKE_MODULE_PATH variable diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 6e682b461..2991ada2f 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -926,7 +926,7 @@ cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source") cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source") cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES - "/CVS/;/\\\\\\\\.svn/;\\\\\\\\.swp$;\\\\\\\\.#;/#") + "/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#") SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}") SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}") SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}") diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake index 1331f4191..1c5293d1a 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})