diff options
author | Brad King <brad.king@kitware.com> | 2016-07-01 13:12:40 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-07-01 13:12:40 (GMT) |
commit | 6e55605db199a4be4d3159c92c40a5e62b880fd5 (patch) | |
tree | 19d794ff0697f7eb5567aa48410b8af0ef11a3bd /Source | |
parent | cff9c11de779e44f3deceaa46f4adf31491b44e8 (diff) | |
parent | 73a3c0cd9857b519350df09811f78c29e3fbd7be (diff) | |
download | CMake-6e55605db199a4be4d3159c92c40a5e62b880fd5.zip CMake-6e55605db199a4be4d3159c92c40a5e62b880fd5.tar.gz CMake-6e55605db199a4be4d3159c92c40a5e62b880fd5.tar.bz2 |
Merge topic 'cmake-gui-static-xcb'
73a3c0cd cmake-gui: Add build option to use Qt5 xcb plugin statically
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 68c65ac..80c0dc0 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -36,6 +36,12 @@ if (Qt5Widgets_FOUND) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}") + if(CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES) + list(APPEND CMake_QT_LIBRARIES ${CMake_QT_STATIC_QXcbIntegrationPlugin_LIBRARIES}) + set_property(SOURCE CMakeSetup.cxx + PROPERTY COMPILE_DEFINITIONS USE_QXcbIntegrationPlugin) + 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. diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index c849d52..ff3a7b2 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -20,6 +20,7 @@ #include <QDir> #include <QLocale> #include <QString> +#include <QtPlugin> #include <QTextCodec> #include <QTranslator> #include <cmsys/CommandLineArguments.hxx> @@ -44,6 +45,10 @@ static int cmOSXInstall(std::string dir); static void cmAddPluginPath(); #endif +#if defined(USE_QXcbIntegrationPlugin) +Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); +#endif + int main(int argc, char** argv) { cmsys::Encoding::CommandLineArguments encoding_args = |