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, next has been updated via 60cfbf02b20d8d117f60f871ec352b954af795c9 (commit) via 672e3bb70f46cbc1203974fccc561760a6be8b96 (commit) via 4853e1effddd36c37d8e2fb4962f039c0d08af80 (commit) via 35cbf23c951e545560e11d79074a66988345c9eb (commit) via 0ac15353e0220e296aca1bb725fc495c1321e4e6 (commit) via a2123e8f3e04b3e1bd5507c488a22a358398232e (commit) via fc6f3401373ccb169a7168c21366c5caee582319 (commit) from 547382e8c9980f0a50eb6cb94bab9bc61a577fed (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=60cfbf02b20d8d117f60f871ec352b954af795c9 commit 60cfbf02b20d8d117f60f871ec352b954af795c9 Merge: 547382e 672e3bb Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Thu Feb 23 18:04:57 2012 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Feb 23 18:04:57 2012 -0500 Merge topic 'qt4-deploy' into next 672e3bb Add test for DeployQt4.cmake 4853e1e Fix plugin installation issues. 35cbf23 Ensure libs are passed to BundleUtilities. 0ac1535 Fix bad plugin paths. a2123e8 Fix mismatched arguments. fc6f340 Don't use QT_LIBRARIES_PLUGINS by default. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=672e3bb70f46cbc1203974fccc561760a6be8b96 commit 672e3bb70f46cbc1203974fccc561760a6be8b96 Author: Clinton Stimpson <clin...@elemtech.com> AuthorDate: Fri Jan 20 16:30:35 2012 -0700 Commit: Clinton Stimpson <clin...@elemtech.com> CommitDate: Thu Feb 23 15:48:47 2012 -0700 Add test for DeployQt4.cmake diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9c97828..2e72dec 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -227,12 +227,16 @@ IF(BUILD_TESTING) LIST(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX}) + IF(NOT QT4_FOUND) + FIND_PACKAGE(Qt4) + ENDIF(NOT QT4_FOUND) # run test for BundleUtilities on supported platforms/compilers if(MSVC OR CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin") if(NOT "${CMAKE_TEST_GENERATOR}" STREQUAL "Watcom WMake") + ADD_TEST(BundleUtilities ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/BundleUtilities" @@ -242,6 +246,23 @@ IF(BUILD_TESTING) --build-project BundleUtilities ) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleUtilities") + + # run test for DeployQt4 on supported platforms/compilers (which depends on BundleUtilities) + # this test also depends on the existence of the standard qtiff plugin + if(QT4_FOUND) + ADD_TEST(Qt4Deploy ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Qt4Deploy" + "${CMake_BINARY_DIR}/Tests/Qt4Deploy" + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project Qt4Deploy + --build-options + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + ) + LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4Deploy") + endif() + endif() endif() diff --git a/Tests/Qt4Deploy/CMakeLists.txt b/Tests/Qt4Deploy/CMakeLists.txt new file mode 100644 index 0000000..ccacf74 --- /dev/null +++ b/Tests/Qt4Deploy/CMakeLists.txt @@ -0,0 +1,70 @@ +cmake_minimum_required(VERSION 2.8) + +project(Qt4Deploy) +set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install) + +find_package(Qt4 REQUIRED QtMain QtCore QtGui QtSql) +include(${QT_USE_FILE}) + +add_executable(testdeploy MACOSX_BUNDLE testdeploy.cpp) +target_link_libraries(testdeploy ${QT_LIBRARIES}) +set_target_properties(testdeploy PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}") + +if(CMAKE_CONFIGURATION_TYPES AND QT_QTCORE_LIBRARY_RELEASE AND QT_QTCORE_LIBRARY_DEBUG) + # note: installing debug Qt libraries from a Qt installation configured with + # -debug-and-release not yet supported (very low priority). + install(CODE " + if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^([Dd][Ee][Bb][Uu][Gg])$\") + return() + endif() + ") +endif() + +# install the Qt4 app with qsqlite plugin +install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}\")") +install(TARGETS testdeploy DESTINATION .) +include(../../Modules/DeployQt4.cmake) +if(APPLE) + install_qt4_executable(testdeploy.app "qsqlite") +elseif(WIN32) + install_qt4_executable(testdeploy.exe "qsqlite") +else() + install_qt4_executable(testdeploy "qsqlite") +endif() + + +# test depends on standard qsqlite plugin +if(QT_QSQLITE_PLUGIN_DEBUG OR QT_QSQLITE_PLUGIN_RELEASE) + + # test the deployed Qt application + if(APPLE) + install(CODE " + message(STATUS \"executing: ${CMAKE_INSTALL_PREFIX}/testdeploy.app/Contents/MacOS/testdeploy\") + execute_process(COMMAND \"${CMAKE_INSTALL_PREFIX}/testdeploy.app/Contents/MacOS/testdeploy\" + RESULT_VARIABLE result) + if(NOT result STREQUAL \"0\") + message(FATAL_ERROR \"error running testdeploy app\") + endif() + ") + else() + install(CODE " + message(STATUS \"executing: ${CMAKE_INSTALL_PREFIX}/testdeploy\") + execute_process(COMMAND \"${CMAKE_INSTALL_PREFIX}/testdeploy\" + RESULT_VARIABLE result) + if(NOT result STREQUAL \"0\") + message(FATAL_ERROR \"error running testdeploy app\") + endif() + ") + endif() + + # custom target to install and test the installation at build time + if(CMAKE_CONFIGURATION_TYPES) + set(install_config "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}") + endif() + + add_custom_target(testdeploy_test ALL + COMMAND ${CMAKE_COMMAND} ${install_config} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake + COMMENT "${CMAKE_COMMAND} ${install_config} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake" + DEPENDS testdeploy) + +endif() diff --git a/Tests/Qt4Deploy/testdeploy.cpp b/Tests/Qt4Deploy/testdeploy.cpp new file mode 100644 index 0000000..bcf77a2 --- /dev/null +++ b/Tests/Qt4Deploy/testdeploy.cpp @@ -0,0 +1,29 @@ +#include <QCoreApplication> +#include <QImageReader> +#include <QSqlDatabase> +#include <QLibraryInfo> +#include <QDebug> + +int main(int argc, char** argv) +{ + QCoreApplication app(argc, argv); + + qDebug() << "App path:" << app.applicationDirPath(); + qDebug() << "Plugin path:" << QLibraryInfo::location(QLibraryInfo::PluginsPath); + + bool foundSqlite = false; + + qDebug() << "Supported Database Drivers:"; + foreach(const QString &sqlDriver, QSqlDatabase::drivers()) + { + qDebug() << " " << sqlDriver; + if(sqlDriver == "QSQLITE") + foundSqlite = true; + } + + if(foundSqlite) + qDebug() << "Found sqlite support from plugin."; + else + qDebug() << "Could not find sqlite support from plugin."; + return foundSqlite ? 0 : 1; +} http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4853e1effddd36c37d8e2fb4962f039c0d08af80 commit 4853e1effddd36c37d8e2fb4962f039c0d08af80 Author: Mike McQuaid <m...@mikemcquaid.com> AuthorDate: Tue Feb 21 17:11:28 2012 +0000 Commit: Mike McQuaid <m...@mikemcquaid.com> CommitDate: Thu Feb 23 21:01:45 2012 +0000 Fix plugin installation issues. diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index a5051df..8a5e9c5 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -220,11 +220,7 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var) if(EXISTS "${plugin}") install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") else() - if(QT_IS_STATIC) - string(TOUPPER "QT_${plugin}_LIBRARY" plugin_var) - else() - string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) - endif() + string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var) set(plugin_release_var "${plugin_var}_RELEASE") set(plugin_debug_var "${plugin_var}_DEBUG") set(plugin_release "${${plugin_release_var}}") @@ -232,10 +228,24 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var) if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}") message(WARNING "Qt plugin \"${plugin}\" not recognized or found.") endif() - install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel") - install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug") + if(NOT EXISTS "${${plugin_debug_var}}") + set(plugin_debug "${plugin_release}") + endif() + + if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel") + install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug") + + if(CMAKE_BUILD_TYPE MATCHES "^Debug$") + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug}) + else() + set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release}) + endif() + else() + install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}") + endif() endif() - set(installed_plugin_paths ${${installed_plugin_path_var}} PARENT_SCOPE) + set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE) endfunction() function(install_qt4_executable executable) @@ -264,11 +274,15 @@ function(install_qt4_executable executable) set(qt_plugins_dir "") endif() - foreach(plugin ${qtplugins}) - set(installed_plugin_paths "") - install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") - list(APPEND libs ${installed_plugin_paths}) - endforeach() + if(QT_IS_STATIC) + message(WARNING "Qt built statically: not installing plugins.") + else() + foreach(plugin ${qtplugins}) + set(installed_plugin_paths "") + install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") + list(APPEND libs ${installed_plugin_paths}) + endforeach() + endif() resolve_qt4_paths(libs) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=35cbf23c951e545560e11d79074a66988345c9eb commit 35cbf23c951e545560e11d79074a66988345c9eb Author: Mike McQuaid <m...@mikemcquaid.com> AuthorDate: Tue Feb 21 17:10:39 2012 +0000 Commit: Mike McQuaid <m...@mikemcquaid.com> CommitDate: Tue Feb 21 17:13:59 2012 +0000 Ensure libs are passed to BundleUtilities. diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index aba339a..a5051df 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -210,7 +210,7 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va endif() install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component}) endif() - set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE) + set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE) endif() endfunction() @@ -235,7 +235,7 @@ function(install_qt4_plugin plugin executable copy installed_plugin_path_var) install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel") install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug") endif() - set(installed_plugin_path_var "${installed_plugin_path_var}" PARENT_SCOPE) + set(installed_plugin_paths ${${installed_plugin_path_var}} PARENT_SCOPE) endfunction() function(install_qt4_executable executable) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ac15353e0220e296aca1bb725fc495c1321e4e6 commit 0ac15353e0220e296aca1bb725fc495c1321e4e6 Author: Mike McQuaid <m...@mikemcquaid.com> AuthorDate: Wed Jan 11 15:39:12 2012 +0000 Commit: Mike McQuaid <m...@mikemcquaid.com> CommitDate: Tue Feb 21 17:13:09 2012 +0000 Fix bad plugin paths. diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index ac9cc29..aba339a 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -82,6 +82,7 @@ include(BundleUtilities) set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}") +set(DeployQt4_apple_plugins_dir "PlugIns") function(write_qt4_conf qt_conf_dir qt_conf_contents) set(qt_conf_path "${qt_conf_dir}/qt.conf") @@ -130,6 +131,9 @@ function(fixup_qt4_executable executable) set(qt_conf_dir "${executable}/Contents/Resources") set(executable_path "${executable}") set(write_qt_conf TRUE) + if(NOT plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() else() get_filename_component(executable_path "${executable}" PATH) if(NOT executable_path) @@ -166,23 +170,19 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va set(component ${ARGV5}) set(configurations ${ARGV6}) if(EXISTS "${plugin}") - if(plugins_dir) - set(plugins_dir "${plugins_dir}") - else() - if(APPLE) - set(plugins_dir "PlugIns") - else() - set(plugins_dir "plugins") - endif() - endif() if(APPLE) + if(NOT plugins_dir) + set(plugins_dir "${DeployQt4_apple_plugins_dir}") + endif() set(plugins_path "${executable}/Contents/${plugins_dir}") else() - get_filename_component(executable_path "${executable}" PATH) - if(NOT executable_path) - set(executable_path ".") + get_filename_component(plugins_path "${executable}" PATH) + if(NOT plugins_path) + set(plugins_path ".") + endif() + if(plugins_dir) + set(plugins_path "${plugins_path}/${plugins_dir}") endif() - set(plugins_path "${executable_path}/${plugins_dir}") endif() set(plugin_group "") http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a2123e8f3e04b3e1bd5507c488a22a358398232e commit a2123e8f3e04b3e1bd5507c488a22a358398232e Author: Mike McQuaid <m...@mikemcquaid.com> AuthorDate: Mon Jan 16 20:15:38 2012 +0000 Commit: Mike McQuaid <m...@mikemcquaid.com> CommitDate: Tue Feb 21 17:12:32 2012 +0000 Fix mismatched arguments. diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 40779b3..ac9cc29 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -141,7 +141,7 @@ function(fixup_qt4_executable executable) foreach(plugin ${qtplugins}) set(installed_plugin_path "") - install_qt4_plugin("${plugin}" "${plugins_dir}" "${executable}" 1 installed_plugin_path) + install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path) list(APPEND libs ${installed_plugin_path}) endforeach() http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc6f3401373ccb169a7168c21366c5caee582319 commit fc6f3401373ccb169a7168c21366c5caee582319 Author: Mike McQuaid <m...@mikemcquaid.com> AuthorDate: Wed Jan 11 15:41:56 2012 +0000 Commit: Mike McQuaid <m...@mikemcquaid.com> CommitDate: Tue Feb 21 17:12:32 2012 +0000 Don't use QT_LIBRARIES_PLUGINS by default. A lot of the libraries won't be found by default so will spit out all sorts of errors. Don't kill QT_LIBRARIES_PLUGINS altogether as it is sometimes useful. diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 83f322c..40779b3 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -264,10 +264,6 @@ function(install_qt4_executable executable) set(qt_plugins_dir "") endif() - if(NOT qtplugins AND QT_LIBRARIES_PLUGINS) - set(qtplugins "${QT_LIBRARIES_PLUGINS}") - endif() - foreach(plugin ${qtplugins}) set(installed_plugin_paths "") install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") ----------------------------------------------------------------------- Summary of changes: Modules/DeployQt4.cmake | 72 ++++++++++++++++++++++----------------- Tests/CMakeLists.txt | 21 +++++++++++ Tests/Qt4Deploy/CMakeLists.txt | 70 ++++++++++++++++++++++++++++++++++++++ Tests/Qt4Deploy/testdeploy.cpp | 29 ++++++++++++++++ 4 files changed, 161 insertions(+), 31 deletions(-) create mode 100644 Tests/Qt4Deploy/CMakeLists.txt create mode 100644 Tests/Qt4Deploy/testdeploy.cpp hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits