diff options
author | Brad King <brad.king@kitware.com> | 2017-11-14 12:22:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-14 12:23:40 (GMT) |
commit | 6c231077256a7032c2833c45166290c50c39a11a (patch) | |
tree | c00b5025a72d094964673020cd39d2ef47ea5379 /Source/QtDialog | |
parent | 8203895caa5d767e87760b22deea36fa2f5e99bf (diff) | |
parent | 3a993c49db687b8cd74fa70d680ebf10eae7708d (diff) | |
download | CMake-6c231077256a7032c2833c45166290c50c39a11a.zip CMake-6c231077256a7032c2833c45166290c50c39a11a.tar.gz CMake-6c231077256a7032c2833c45166290c50c39a11a.tar.bz2 |
Merge topic 'cmake-gui-qt-static-windows'
3a993c49 Tests: Add options to disable tests requiring Qt
27a73f16 cmake-gui: Add build option to use Qt5 windows plugin statically
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1476
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 9e9df78..b38797b 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -33,6 +33,12 @@ if (Qt5Widgets_FOUND) PROPERTY COMPILE_DEFINITIONS USE_QXcbIntegrationPlugin) endif() + if(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES) + list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES}) + set_property(SOURCE CMakeSetup.cxx + PROPERTY COMPILE_DEFINITIONS USE_QWindowsIntegrationPlugin) + endif() + # We need to install platform plugin and add qt.conf for Qt5 on Mac and Windows. # FIXME: This should be part of Qt5 CMake scripts, but unfortunatelly # Qt5 support is missing there. @@ -65,7 +71,7 @@ if (Qt5Widgets_FOUND) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources" ${COMPONENT}) - elseif(WIN32) + elseif(WIN32 AND NOT CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES) install_qt5_plugin("Qt5::QWindowsIntegrationPlugin" QT_PLUGINS) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "[Paths]\nPlugins = ../${_qt_plugin_dir}\n") diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index ca0b015..bfd43cf 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -44,6 +44,10 @@ static void cmAddPluginPath(); Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); #endif +#if defined(USE_QWindowsIntegrationPlugin) +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); +#endif + int main(int argc, char** argv) { cmsys::Encoding::CommandLineArguments encoding_args = |