From 78a6b807195b5dee50f5f6b2e1a86f49af60cb39 Mon Sep 17 00:00:00 2001 From: Artem Pisarenko Date: Thu, 16 Jan 2020 14:47:00 +0600 Subject: Fix win32 support for linking against static builds in CMake CMake mkspec feature sets CMAKE_PRL_FILE_LOCATION_* values inconsistent with actual .prl file names being generated/installed, causing dependency extraction mechanism in Qt5BasicConfig.cmake.in to not work (function _qt5_$${CMAKE_MODULE_NAME}_process_prl_file silently fails to find file at given location and skips filling libs deps). [ChangeLog][CMake][Windows] Fixed linking with Qt static build Fixes: QTBUG-81401 Change-Id: I5861cc0c42163d898ba55ad83cbad1994dcb1db2 Reviewed-by: Alexandru Croitor --- mkspecs/features/create_cmake.prf | 41 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 346fbf2467..0d93597012 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -212,21 +212,17 @@ contains(CONFIG, plugin) { CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _) win32 { + CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl isEmpty(CMAKE_STATIC_TYPE) { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl } else:mingw { CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.prl } else { # MSVC static CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib - CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl - CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl } } else { mac { @@ -316,36 +312,25 @@ mac { CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_STATIC_WINDOWS_BUILD = "true" + + CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl + CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl + } + mingw { CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_STATIC_WINDOWS_BUILD = "true" - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a - - CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl - CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl - } else { - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a - } + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a } else { CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib - !isEmpty(CMAKE_STATIC_TYPE) { - CMAKE_STATIC_WINDOWS_BUILD = "true" - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib - - CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl - CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl - } else { - CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib - CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib - } + CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib } } else { !isEmpty(CMAKE_STATIC_TYPE) { -- cgit v1.2.3 From 0a4c5b5119ccefc355fe737f03ec330e70c33ec9 Mon Sep 17 00:00:00 2001 From: Alexandra Cherdantseva Date: Fri, 17 Jan 2020 12:32:27 +0300 Subject: wasm: fix redundant string conversions between wasm and JavaScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid redundant conversions from UTF16 to UTF8 to UTF16 with help of new class QWasmString static methods: + QWasmString::fromQString to convert QString to js string using js Module.UTF16ToString + QWasmString::toQString to convert js string to QString using js Module.stringToUTF16 Fixed document.getElementById calls for cavasId with unicode characters. Change-Id: I3fc55bfeb6aeda75fa3acd85d22cea667b542f38 Reviewed-by: Morten Johan Sørvig Reviewed-by: Lorn Potter --- mkspecs/wasm-emscripten/qmake.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs') diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf index 48c3fb7359..f4e9501415 100644 --- a/mkspecs/wasm-emscripten/qmake.conf +++ b/mkspecs/wasm-emscripten/qmake.conf @@ -35,6 +35,7 @@ EMCC_COMMON_LFLAGS += \ -s USE_WEBGL2=1 \ -s NO_EXIT_RUNTIME=0 \ -s ERROR_ON_UNDEFINED_SYMBOLS=1 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"] \ --bind # The -s arguments can also be used with release builds, -- cgit v1.2.3 From 474a5e2f3fe7d5fdcb930b0b6da896cd4d9c209c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 22 Jan 2020 12:38:53 +0100 Subject: Fix handling of the DEFINES_DEBUG/DEFINES_RELEASE variables Modifications of the CONFIG variable in the project file wasn't taken into account in the handling of DEFINES_DEBUG and DEFINES_RELEASE, because it was happening before the evaluation of the project file. Moved the handling code into default_post.prf where the other *_DEBUG and *_RELEASE variables are handled. In practice that means: to avoid the addition of the NDEBUG define one has to remove NDEBUG from DEFINES_RELEASE. This amends commit 1456b809. [ChangeLog][qmake] To remove the NDEBUG define that is added by default in MSVC mkspecs, write DEFINES_RELEASE -= NDEBUG in your .pro file. Fixes: QTBUG-81569 Change-Id: I2ea5628653275a4e48ad002977d34969c0663815 Reviewed-by: Alexandru Croitor --- mkspecs/features/default_post.prf | 2 ++ mkspecs/features/default_pre.prf | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 0e41b825ec..1d79f5c958 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -64,11 +64,13 @@ debug { QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG + DEFINES += $$DEFINES_DEBUG } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + DEFINES += $$DEFINES_RELEASE } stack_protector_strong { diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index b2629d04c0..1c24bf071a 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -26,10 +26,4 @@ CONFIG = \ unset(today) } -CONFIG(debug, debug|release) { - DEFINES += $$DEFINES_DEBUG -} else { - DEFINES += $$DEFINES_RELEASE -} - load(toolchain) -- cgit v1.2.3