cmake-gui: Add build option to use Qt5 xcb plugin statically
This will enable builds against a static Qt5.
This commit is contained in:
parent
b1883bc8b7
commit
73a3c0cd98
|
@ -36,6 +36,12 @@ if (Qt5Widgets_FOUND)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
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.
|
# 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
|
# FIXME: This should be part of Qt5 CMake scripts, but unfortunatelly
|
||||||
# Qt5 support is missing there.
|
# Qt5 support is missing there.
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QtPlugin>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <cmsys/CommandLineArguments.hxx>
|
#include <cmsys/CommandLineArguments.hxx>
|
||||||
|
@ -44,6 +45,10 @@ static int cmOSXInstall(std::string dir);
|
||||||
static void cmAddPluginPath();
|
static void cmAddPluginPath();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_QXcbIntegrationPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
cmsys::Encoding::CommandLineArguments encoding_args =
|
cmsys::Encoding::CommandLineArguments encoding_args =
|
||||||
|
|
Loading…
Reference in New Issue