summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-03-11 12:34:52 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-03-18 15:34:52 +0000
commit3f03917b54ace1041f7a640dc65b452b0275fafc (patch)
treecdeed63c0b1afcd906e07352b6e829fbaa9d7133 /cmake
parent4f1a155909dfcba7353ebe9eee669d65336bd943 (diff)
Fix Windows build
- Fix qmake build - Fix QtNetwork moc-ing, by including the moc files inside the cpp files - Fix sql odbc plugin by including QT_PLUGIN define - Fix Boostrap to link against the Platform target, to get the correct Unicode and WIN64 defines. - Fix vulkan headers to be found - Fix freetype bzip and png unresolved symbols / linker issues when building minimal platform plugin (also need to make sure to use the vcpkg toolchain instead of CMAKE_PREFIX_PATH because then find_package is overridden, which does magic to properly propagate static library dependencies). - Fix qfilesystementry test not to be built without private tests feature (it led to undefined symbols issues). - Make sure to remove QT_NO_CAST_TO_ASCII define when building QtCore, so that the qstringbuilder3 test builds successfully. Task-number: QTBUG-74140 Change-Id: I353d08392b604d55f8e62cdd8696d1e19a3c084a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index f08415d88e..e7ae97e503 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -707,6 +707,7 @@ function(add_qt_plugin target)
QT_BUILDING_QT
QT_BUILD_${module_upper}_LIB ### FIXME: use QT_BUILD_ADDON for Add-ons or remove if we don't have add-ons anymore
"${deprecation_define}"
+ QT_PLUGIN
PUBLIC_DEFINES
QT_${module_upper}_LIB
${arg_PUBLIC_DEFINES}
@@ -722,6 +723,10 @@ function(add_qt_plugin target)
MOC_OPTIONS ${arg_MOC_OPTIONS}
)
+ if(NOT ${QT_BUILD_SHARED_LIBS})
+ extend_target("${target}" DEFINES QT_STATICPLUGIN)
+ endif()
+
install(TARGETS "${target}" EXPORT "${target}Targets"
LIBRARY DESTINATION ${INSTALL_PLUGINSDIR}/${arg_TYPE}
ARCHIVE DESTINATION ${INSTALL_LIBDIR}/${arg_TYPE}