From 96f4487c77fbf08518a9ee665612927c97ce8ebd Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Thu, 12 Sep 2019 19:07:22 +0200 Subject: [PATCH] [Qt] Update to 5.12.4 (#7667) * update to 5.12.4 * removed port qt5-modularscripts and split it functionality into more functions into qt5-base * added qt_port_hashes.cmake for simpler upgrade. * added optional VCPKG_QT_HOST_MKSPEC and VCPKG_QT_TARGET_MKSPEC to select QTs build mkspecs from a triplet * qt_.conf are now copied from the build dir instead from the port dir * fixed freetype dependencies. * cleanup of vcpkg_qmake scripts. No strange/unclear replacements anymore. * introduced vcpkg_buildpath_length_warning * changed directory layout of the qt5 installation executables and mkspecs a bit. --- ports/libqglviewer/CONTROL | 2 +- .../QGLViewer_remove_shared.patch | 13 + ports/libqglviewer/macosx.patch | 13 + ports/libqglviewer/portfile.cmake | 2 + ports/qt5-3d/CONTROL | 4 +- ports/qt5-3d/portfile.cmake | 7 +- ports/qt5-activeqt/CONTROL | 4 +- ports/qt5-activeqt/portfile.cmake | 9 +- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/cmake/configure_qt.cmake | 132 ++++++ ports/qt5-base/cmake/find_qt_mkspec.cmake | 101 ++++ ports/qt5-base/cmake/install_qt.cmake | 121 +++++ ports/qt5-base/cmake/qt_build_submodule.cmake | 83 ++++ .../cmake/qt_download_submodule.cmake | 32 ++ ports/qt5-base/cmake/qt_fix_cmake.cmake | 27 ++ .../cmake/qt_fix_makefile_install.cmake | 26 ++ ports/qt5-base/cmake/qt_fix_prl.cmake | 10 + .../qt5-base/cmake/qt_install_copyright.cmake | 16 + ports/qt5-base/cmake/qt_port_functions.cmake | 14 + ports/qt5-base/cmake/qt_port_hashes.cmake | 51 +++ .../cmake/qt_submodule_installation.cmake | 7 + ports/qt5-base/configure_qt.cmake | 72 --- ports/qt5-base/fix-system-freetype.patch | 18 - ports/qt5-base/fix-system-pcre2-linux.patch | 16 - ports/qt5-base/fix-system-pcre2.patch | 17 - ports/qt5-base/fixcmake.py | 27 +- ports/qt5-base/install_qt.cmake | 80 ---- ports/qt5-base/patches/gui_configure.patch | 16 + ports/qt5-base/patches/qt_app.patch | 17 + ports/qt5-base/patches/static_opengl.patch | 62 +++ ports/qt5-base/patches/windows_prf.patch | 13 + ports/qt5-base/patches/winmain_pro.patch | 27 ++ ports/qt5-base/portfile.cmake | 430 +++++++++--------- ports/qt5-base/qt_debug.conf | 13 - ports/qt5-base/qt_release.conf | 13 - ports/qt5-charts/CONTROL | 4 +- ports/qt5-charts/portfile.cmake | 7 +- ports/qt5-connectivity/CONTROL | 4 +- ports/qt5-connectivity/portfile.cmake | 7 +- ports/qt5-datavis3d/CONTROL | 4 +- ports/qt5-datavis3d/portfile.cmake | 7 +- ports/qt5-declarative/CONTROL | 8 +- ports/qt5-declarative/portfile.cmake | 27 +- ports/qt5-gamepad/CONTROL | 4 +- ports/qt5-gamepad/portfile.cmake | 7 +- ports/qt5-graphicaleffects/CONTROL | 4 +- ports/qt5-graphicaleffects/portfile.cmake | 10 +- ports/qt5-imageformats/CONTROL | 4 +- ports/qt5-imageformats/portfile.cmake | 10 +- ports/qt5-location/CONTROL | 4 +- ports/qt5-location/portfile.cmake | 7 +- ports/qt5-macextras/CONTROL | 4 +- ports/qt5-macextras/portfile.cmake | 8 +- ports/qt5-modularscripts/CONTROL | 4 +- ports/qt5-modularscripts/fixcmake.py | 66 --- ports/qt5-modularscripts/portfile.cmake | 10 +- .../qt_modular_library.cmake | 166 ------- ports/qt5-mqtt/CONTROL | 4 +- ports/qt5-mqtt/portfile.cmake | 21 +- ports/qt5-multimedia/CONTROL | 4 +- ports/qt5-multimedia/portfile.cmake | 7 +- ports/qt5-networkauth/CONTROL | 4 +- ports/qt5-networkauth/portfile.cmake | 7 +- ports/qt5-purchasing/CONTROL | 4 +- ports/qt5-purchasing/portfile.cmake | 7 +- ports/qt5-quickcontrols/CONTROL | 4 +- ports/qt5-quickcontrols/portfile.cmake | 10 +- ports/qt5-quickcontrols2/CONTROL | 4 +- ports/qt5-quickcontrols2/portfile.cmake | 7 +- ports/qt5-remoteobjects/CONTROL | 4 +- ports/qt5-remoteobjects/portfile.cmake | 7 +- ports/qt5-script/CONTROL | 4 +- ports/qt5-script/portfile.cmake | 7 +- ports/qt5-scxml/CONTROL | 4 +- ports/qt5-scxml/portfile.cmake | 7 +- ports/qt5-sensors/CONTROL | 4 +- ports/qt5-sensors/portfile.cmake | 7 +- ports/qt5-serialport/CONTROL | 4 +- ports/qt5-serialport/portfile.cmake | 7 +- ports/qt5-speech/CONTROL | 4 +- ports/qt5-speech/portfile.cmake | 7 +- ports/qt5-svg/CONTROL | 4 +- ports/qt5-svg/portfile.cmake | 7 +- ports/qt5-tools/CONTROL | 4 +- ports/qt5-tools/portfile.cmake | 9 +- ports/qt5-virtualkeyboard/CONTROL | 4 +- ports/qt5-virtualkeyboard/portfile.cmake | 9 +- ports/qt5-webchannel/CONTROL | 4 +- ports/qt5-webchannel/portfile.cmake | 7 +- ports/qt5-websockets/CONTROL | 4 +- ports/qt5-websockets/portfile.cmake | 7 +- ports/qt5-webview/CONTROL | 4 +- ports/qt5-webview/portfile.cmake | 7 +- ports/qt5-winextras/CONTROL | 4 +- ports/qt5-winextras/portfile.cmake | 8 +- ports/qt5-xmlpatterns/CONTROL | 4 +- ports/qt5-xmlpatterns/portfile.cmake | 7 +- ports/qt5/CONTROL | 3 +- scripts/cmake/vcpkg_build_qmake.cmake | 82 +--- .../vcpkg_buildpath_length_warning.cmake | 8 + scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_configure_qmake.cmake | 34 +- 102 files changed, 1221 insertions(+), 1022 deletions(-) create mode 100644 ports/libqglviewer/QGLViewer_remove_shared.patch create mode 100644 ports/libqglviewer/macosx.patch create mode 100644 ports/qt5-base/cmake/configure_qt.cmake create mode 100644 ports/qt5-base/cmake/find_qt_mkspec.cmake create mode 100644 ports/qt5-base/cmake/install_qt.cmake create mode 100644 ports/qt5-base/cmake/qt_build_submodule.cmake create mode 100644 ports/qt5-base/cmake/qt_download_submodule.cmake create mode 100644 ports/qt5-base/cmake/qt_fix_cmake.cmake create mode 100644 ports/qt5-base/cmake/qt_fix_makefile_install.cmake create mode 100644 ports/qt5-base/cmake/qt_fix_prl.cmake create mode 100644 ports/qt5-base/cmake/qt_install_copyright.cmake create mode 100644 ports/qt5-base/cmake/qt_port_functions.cmake create mode 100644 ports/qt5-base/cmake/qt_port_hashes.cmake create mode 100644 ports/qt5-base/cmake/qt_submodule_installation.cmake delete mode 100644 ports/qt5-base/configure_qt.cmake delete mode 100644 ports/qt5-base/fix-system-freetype.patch delete mode 100644 ports/qt5-base/fix-system-pcre2-linux.patch delete mode 100644 ports/qt5-base/fix-system-pcre2.patch delete mode 100644 ports/qt5-base/install_qt.cmake create mode 100644 ports/qt5-base/patches/gui_configure.patch create mode 100644 ports/qt5-base/patches/qt_app.patch create mode 100644 ports/qt5-base/patches/static_opengl.patch create mode 100644 ports/qt5-base/patches/windows_prf.patch create mode 100644 ports/qt5-base/patches/winmain_pro.patch delete mode 100644 ports/qt5-base/qt_debug.conf delete mode 100644 ports/qt5-base/qt_release.conf delete mode 100644 ports/qt5-modularscripts/fixcmake.py delete mode 100644 ports/qt5-modularscripts/qt_modular_library.cmake create mode 100644 scripts/cmake/vcpkg_buildpath_length_warning.cmake diff --git a/ports/libqglviewer/CONTROL b/ports/libqglviewer/CONTROL index add042b7e12..a80694a2f14 100644 --- a/ports/libqglviewer/CONTROL +++ b/ports/libqglviewer/CONTROL @@ -1,4 +1,4 @@ Source: libqglviewer -Version: 2.7.0 +Version: 2.7.0-2 Description: libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers. Build-Depends: qt5-base diff --git a/ports/libqglviewer/QGLViewer_remove_shared.patch b/ports/libqglviewer/QGLViewer_remove_shared.patch new file mode 100644 index 00000000000..f339d81a53f --- /dev/null +++ b/ports/libqglviewer/QGLViewer_remove_shared.patch @@ -0,0 +1,13 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index f9afe8089..63f74736e 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -7,7 +7,7 @@ + TEMPLATE = lib + TARGET = QGLViewer + VERSION = 2.7.0 +-CONFIG *= qt opengl warn_on shared thread create_prl rtti no_keywords ++CONFIG *= qt opengl warn_on thread create_prl rtti no_keywords + + QGL_HEADERS = \ + qglviewer.h \ diff --git a/ports/libqglviewer/macosx.patch b/ports/libqglviewer/macosx.patch new file mode 100644 index 00000000000..206e85c1bed --- /dev/null +++ b/ports/libqglviewer/macosx.patch @@ -0,0 +1,13 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index 702925cb6..fc3cb7118 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -224,7 +224,7 @@ macx|darwin-g++ { + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS + + # So that the path QGLViewer/*.h exists +- QMAKE_POST_LINK=cd $$DESTDIR/QGLViewer.framework/Headers && (test -L QGLViewer || ln -s . QGLViewer) ++ #QMAKE_POST_LINK=cd $$DESTDIR/QGLViewer.framework/Headers && (test -L QGLViewer || ln -s . QGLViewer) + + # Specific paths for the installation of the framework. + !isEmpty( LIB_DIR ) { diff --git a/ports/libqglviewer/portfile.cmake b/ports/libqglviewer/portfile.cmake index 7a7cc9fdfb0..6f980c0ae4c 100644 --- a/ports/libqglviewer/portfile.cmake +++ b/ports/libqglviewer/portfile.cmake @@ -7,6 +7,8 @@ vcpkg_from_github( SHA512 0586020c159fa4b3acb3ea3fa0a361bcc757d840298d7a436c356d0929b5ace3da4d054e3c0d107a499076413336e3b9a2f35750e6bf0add9320cc52a5c7afd5 HEAD_REF master PATCHES "use-default-config-on-all-platforms.patch" + "QGLViewer_remove_shared.patch" + "macosx.patch" ) vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro) diff --git a/ports/qt5-3d/CONTROL b/ports/qt5-3d/CONTROL index 0dfbdb027c8..0fe41893ea6 100644 --- a/ports/qt5-3d/CONTROL +++ b/ports/qt5-3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-3d -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-3d/portfile.cmake b/ports/qt5-3d/portfile.cmake index 444fbbcf2a0..214726759f3 100644 --- a/ports/qt5-3d/portfile.cmake +++ b/ports/qt5-3d/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qt3d 679c2dbc60fc53c1c5469369f25244bd844c2e6e723a1b451f7cbb50bfa018e6fb715214e5a5df6fb32d7c7936bb6c99d85e299fe2b76344bcf774c93ed0acd0) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-activeqt/CONTROL b/ports/qt5-activeqt/CONTROL index e2084f0468f..1c9d7468a78 100644 --- a/ports/qt5-activeqt/CONTROL +++ b/ports/qt5-activeqt/CONTROL @@ -1,4 +1,4 @@ Source: qt5-activeqt -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 ActiveQt Module - ActiveX components -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-activeqt/portfile.cmake b/ports/qt5-activeqt/portfile.cmake index 40c4875d928..a73a605512c 100644 --- a/ports/qt5-activeqt/portfile.cmake +++ b/ports/qt5-activeqt/portfile.cmake @@ -1,11 +1,6 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "qt5-activeqt only support Windows.") endif() -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtactiveqt 477c42653a59739aeeb17ab54bdd5cc50bc72a117250926e940c34d3f81d1b92356074056fb49f3cd811a88840377836b2d97cea8cbc62ae1d895168e7860753) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-activeqt/plugins/platforminputcontexts) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index fb4b4a20055..2a496174617 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,5 +1,5 @@ Source: qt5-base -Version: 5.12.3-4 +Version: 5.12.4-6 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-base/cmake/configure_qt.cmake b/ports/qt5-base/cmake/configure_qt.cmake new file mode 100644 index 00000000000..623924d71e9 --- /dev/null +++ b/ports/qt5-base/cmake/configure_qt.cmake @@ -0,0 +1,132 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;TARGET_PLATFORM;HOST_PLATFORM;HOST_TOOLS_ROOT" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if(NOT _csc_TARGET_PLATFORM) + message(FATAL_ERROR "configure_qt requires a TARGET_PLATFORM argument.") + endif() + + if(DEFINED _csc_HOST_PLATFORM) + list(APPEND _csc_OPTIONS -platform ${_csc_HOST_PLATFORM}) + endif() + + if(DEFINED _csc_HOST_TOOLS_ROOT) + ## vcpkg internal file struture assumed here! + message(STATUS "Building Qt with prepared host tools from ${_csc_HOST_TOOLS_ROOT}!") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}/bin") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}") + set(EXT_BIN_DIR -external-hostbindir ${_csc_HOST_TOOLS_ROOT}/bin) # we only use release binaries for building + find_program(QMAKE_COMMAND NAMES qmake PATHS ${_csc_HOST_TOOLS_ROOT}/bin NO_DEFAULT_PATH) + set(INVOKE "${QMAKE_COMMAND}" ) + else() + if(CMAKE_HOST_WIN32) + set(CONFIGURE_BAT "configure.bat") + else() + set(CONFIGURE_BAT "configure") + endif() + set(INVOKE "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}") + endif() + + #Cleanup previous build folders + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + #Find and ad Perl to PATH + vcpkg_find_acquire_program(PERL) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + vcpkg_add_to_path("${PERL_EXE_PATH}") + + if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static) + else() + #list(APPEND _csc_OPTIONS_DEBUG -separate-debug-info) + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static-runtime) + endif() + + list(APPEND _csc_OPTIONS_RELEASE -release) + list(APPEND _csc_OPTIONS_DEBUG -debug) + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + message(STATUS "Configuring ${_build_triplet}") + set(_build_dir "${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + file(MAKE_DIRECTORY ${_build_dir}) + # These paths get hardcoded into qmake. So point them into the CURRENT_INSTALLED_DIR instead of CURRENT_PACKAGES_DIR + # makefiles will be fixed to install into CURRENT_PACKAGES_DIR in install_qt + set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}} + -prefix ${CURRENT_INSTALLED_DIR} + -extprefix ${CURRENT_INSTALLED_DIR} + ${EXT_BIN_DIR} + -hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -hostlibdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib # could probably be move to manual-link + -hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/bin + # Qt VS Plugin requires a /bin subfolder with the executables in the root dir. But to use the wizard a correctly setup lib folder is also required + # So with the vcpkg layout there is no way to make it work unless all dll are are copied to tools/qt5/bin and all libs to tools/qt5/lib + -archdatadir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -datadir ${CURRENT_INSTALLED_DIR}${_path_suffix}/share/qt5${_path_suffix_${_buildname}} + -plugindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/plugins + -qmldir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/qml + -headerdir ${CURRENT_INSTALLED_DIR}/include + -libexecdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -bindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin + -libdir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link + -xplatform ${_csc_TARGET_PLATFORM} + ) + + if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake + if(WIN32) + set(INVOKE_OPTIONS "QMAKE_CXX.QMAKE_MSC_VER=1911" "QMAKE_MSC_VER=1911") + endif() + vcpkg_execute_required_process( + COMMAND ${INVOKE} "${_csc_SOURCE_PATH}" "${INVOKE_OPTIONS}" -- ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + else()# call configure (builds qmake for triplet and calls it like above) + vcpkg_execute_required_process( + COMMAND "${INVOKE}" ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + endif() + + # Note archdatadir and datadir are required to be prefixed with the hostprefix? + message(STATUS "Configuring ${_build_triplet} done") + + # Copy configuration dependent qt.conf + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_CURRENT_INSTALLED_DIR_PATH) + file(READ "${CURRENT_BUILDTREES_DIR}/${_build_triplet}/bin/qt.conf" _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "${CMAKE_CURRENT_INSTALLED_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + #string(REPLACE "HostPrefix=\${CURRENT_PACKAGES_DIR}" "HostPrefix=\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "[EffectivePaths]\nPrefix=..\n" "" _contents ${_contents}) + string(REPLACE "[EffectiveSourcePaths]\nPrefix=${_csc_SOURCE_PATH}\n" "" _contents ${_contents}) + string(REPLACE "Sysroot=\n" "" _contents ${_contents}) + string(REPLACE "SysrootifyPrefix=false\n" "" _contents ${_contents}) + file(WRITE "${CURRENT_PACKAGES_DIR}/tools/qt5/qt_${_build_type_${_buildname}}.conf" "${_contents}") + endforeach() + +endfunction() diff --git a/ports/qt5-base/cmake/find_qt_mkspec.cmake b/ports/qt5-base/cmake/find_qt_mkspec.cmake new file mode 100644 index 00000000000..035aec1adc4 --- /dev/null +++ b/ports/qt5-base/cmake/find_qt_mkspec.cmake @@ -0,0 +1,101 @@ +function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_HOST_TOOLS_OUT) + ## Figure out QTs target mkspec + if(NOT DEFINED VCPKG_QT_TARGET_MKSPEC) + message(STATUS "Figuring out qt target mkspec. Target arch ${VCPKG_TARGET_ARCHITECTURE}") + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(msvc_year "2015") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(msvc_year "2017") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(msvc_year "2019") + else() + message(FATAL_ERROR "No target mkspec found!") + endif() + set(_tmp_targ_out "winrt-${VCPKG_TARGET_ARCHITECTURE}-msvc${msvc_year}") + else() + if("${VCPKG_TARGET_ARCHITECTURE}" MATCHES "arm64") + message(STATUS "Figuring out arm64") + set(_tmp_targ_out "win32-arm64-msvc2017") #mkspec does not have anything defined related to msvc2017 so this should work + else() + set(_tmp_targ_out "win32-msvc") + endif() + endif() + elseif(VCPKG_TARGET_IS_LINUX) + set(_tmp_targ_out "linux-g++" ) + elseif(VCPKG_TARGET_IS_OSX) + set(_tmp_targ_out "macx-clang") # switch to macx-g++ since vcpkg requires g++ to compile any way? + endif() + else() + set(_tmp_targ_out ${VCPKG_QT_TARGET_MKSPEC}) + endif() + message(STATUS "Target mkspec set to: ${_tmp_targ_out}") + set(${TARGET_PLATFORM_MKSPEC_OUT} ${_tmp_targ_out} PARENT_SCOPE) + + ## Figure out QTs host mkspec + if(NOT DEFINED VCPKG_QT_HOST_MKSPEC) + #if(WIN32) + # set(_tmp_host_out "win32-msvc") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Linux") + # set(_tmp_host_out "linux-g++") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Darwin") + # set(_tmp_host_out "macx-clang") + #endif() + if(DEFINED _tmp_host_out) + message(STATUS "Host mkspec set to: ${_tmp_host_out}") + else() + message(STATUS "Host mkspec not set. Qt's own buildsystem will try to figure out the host system") + endif() + else() + set(_tmp_host_out ${VCPKG_QT_HOST_MKSPEC}) + endif() + + if(DEFINED _tmp_host_out) + set(${HOST_PLATFORM_MKSPEC_OUT} ${_tmp_host_out} PARENT_SCOPE) + endif() + + ## Figure out VCPKG qt-tools directory for the port. + if(NOT DEFINED VCPKG_QT_HOST_TOOLS_ROOT AND DEFINED VCPKG_QT_HOST_PLATFORM) ## Root dir of the required host tools + if(NOT "${_tmp_host_out}" MATCHES "${_tmp_host_out}") + if(CMAKE_HOST_WIN32) + + if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][rR][mM]64") + list(APPEND _test_triplets arm64-windows) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][mM][dD]64") + list(APPEND _test_triplets x64-windows x64-windows-static) + list(APPEND _test_triplets x86-windows x86-windows-static) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "x86") + list(APPEND _test_triplets x86-windows x86-windows-static) + else() + message(FATAL_ERROR "Unknown host processor! Host Processor $ENV{PROCESSOR_ARCHITECTURE}") + endif() + elseif(CMAKE_HOST_SYSTEM STREQUAL "Linux") + list(APPEND _test_triplets "x64-linux") + elseif(CMAKE_HOST_SYSTEM STREQUAL "Darwin") + list(APPEND _test_triplets "x64-osx") + else() + endif() + foreach(_triplet ${_test_triplets}) + find_program(QMAKE_PATH qmake PATHS ${VCPKG_ROOT_DIR}/installed/${_triplet}/tools/qt5/bin NO_DEFAULT_PATHS) + message(STATUS "Checking: ${VCPKG_ROOT_DIR}/installed/${_triplet}/tools/qt5/bin. ${QMAKE_PATH}") + if(QMAKE_PATH) + set(_tmp_host_root "${VCPKG_ROOT_DIR}/installed/${_triplet}/tools/qt5") + set(_tmp_host_qmake ${QMAKE_PATH} PARENT_SCOPE) + message(STATUS "Qt host tools root dir within vcpkg: ${_tmp_host_root}") + break() + endif() + endforeach() + if(NOT DEFINED _tmp_host_root) + message(FATAL_ERROR "Unable to locate required host tools. Please define VCPKG_QT_HOST_TOOLS_ROOT to the required root dir of the host tools") + endif() + endif() + else() + set(_tmp_host_root ${VCPKG_QT_HOST_TOOLS_ROOT}) + endif() + + if(DEFINED _tmp_host_root) + set(${EXT_HOST_TOOLS_OUT} ${_tmp_host_root} PARENT_SCOPE) + endif() + +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/install_qt.cmake b/ports/qt5-base/cmake/install_qt.cmake new file mode 100644 index 00000000000..ebe2dc83307 --- /dev/null +++ b/ports/qt5-base/cmake/install_qt.cmake @@ -0,0 +1,121 @@ +include(qt_fix_makefile_install) + +function(install_qt) + cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) + + if (_bc_DISABLE_PARALLEL) + set(NUMBER_OF_PROCESSORS "1") + else() + if(DEFINED ENV{NUMBER_OF_PROCESSORS}) + set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) + elseif(VCPKG_TARGET_IS_OSX) + execute_process( + COMMAND sysctl -n hw.ncpu + OUTPUT_VARIABLE NUMBER_OF_PROCESSORS + ) + string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + else() + execute_process( + COMMAND nproc + OUTPUT_VARIABLE NUMBER_OF_PROCESSORS + ) + string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + endif() + endif() + + message(STATUS "NUMBER_OF_PROCESSORS is ${NUMBER_OF_PROCESSORS}") + + if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}" /J ${NUMBER_OF_PROCESSORS}) + else() + find_program(MAKE make) + set(INVOKE "${MAKE}" -j${NUMBER_OF_PROCESSORS}) + set(INVOKE_SINGLE "${MAKE}" -j1) + endif() + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") + + if (CMAKE_HOST_WIN32) + # flex and bison for ANGLE library + vcpkg_find_acquire_program(FLEX) + get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY) + get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME) + + file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" ) + set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}") + file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe") + file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe") + vcpkg_add_to_path("${FLEX_TEMP}") + endif() + + set(_path "$ENV{PATH}") + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin") + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning before build ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-1-${_build_triplet} + ) + endif() + + message(STATUS "Building ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME build-${_build_triplet} + ) + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning after build before install ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-2-${_build_triplet} + ) + endif() + + message(STATUS "Fixig makefile installation path ${_build_triplet}") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + message(STATUS "Installing ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME package-${_build_triplet} + ) + message(STATUS "Package ${_build_triplet} done") + set(ENV{PATH} "${_path}") + endforeach() + + + +endfunction() diff --git a/ports/qt5-base/cmake/qt_build_submodule.cmake b/ports/qt5-base/cmake/qt_build_submodule.cmake new file mode 100644 index 00000000000..f850ad55160 --- /dev/null +++ b/ports/qt5-base/cmake/qt_build_submodule.cmake @@ -0,0 +1,83 @@ + +function(qt_build_submodule SOURCE_PATH) + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV{_CL_} "/utf-8") + + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + vcpkg_add_to_path("${PYTHON2_EXE_PATH}") + + vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) + + vcpkg_build_qmake(SKIP_MAKEFILES) + + #Fix the installation location within the makefiles + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/") + + #Install the module files + vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) + + qt_fix_cmake(${CURRENT_PACKAGES_DIR} ${PORT}) + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(CURRENT_BUILD_PACKAGE_DIR "${CURRENT_PACKAGES_DIR}${_path_suffix_${_buildname}}") + #Fix PRL files + file(GLOB_RECURSE PRL_FILES "${CURRENT_BUILD_PACKAGE_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib/*.prl" + "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/mkspecs/*.pri") + qt_fix_prl("${CURRENT_BUILD_PACKAGE_DIR}" "${PRL_FILES}") + + # This makes it impossible to use the build tools in any meaningful way. qt5 assumes they are all in one folder! + # So does the Qt VS Plugin which even assumes all of the in a bin folder + #Move tools to the correct directory + #if(EXISTS ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5) + # file(RENAME ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + #endif() + + # Move executables in bin to tools + # This is ok since those are not build tools. + file(GLOB PACKAGE_EXE ${CURRENT_BUILD_PACKAGE_DIR}/bin/*.exe) + if(PACKAGE_EXE) + file(INSTALL ${PACKAGE_EXE} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${PACKAGE_EXE}) + foreach(_exe ${PACKAGE_EXE}) + string(REPLACE ".exe" ".pdb" _prb_file ${_exe}) + if(EXISTS ${_prb_file}) + file(INSTALL ${_prb_file} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${_prb_file}) + endif() + endforeach() + endif() + + #cleanup empty folders + file(GLOB PACKAGE_LIBS "${CURRENT_BUILD_PACKAGE_DIR}/lib/*") + if(NOT PACKAGE_LIBS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/lib") + endif() + + file(GLOB PACKAGE_BINS "${CURRENT_BUILD_PACKAGE_DIR}/bin/*") + if(NOT PACKAGE_BINS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/bin") + endif() + endforeach() + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/bin") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/qt5/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + endif() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_download_submodule.cmake b/ports/qt5-base/cmake/qt_download_submodule.cmake new file mode 100644 index 00000000000..51e7c557a34 --- /dev/null +++ b/ports/qt5-base/cmake/qt_download_submodule.cmake @@ -0,0 +1,32 @@ +function(qt_get_submodule_name OUT_NAME) + string(REPLACE "5-" "" _tmp_name ${PORT}) + set(${OUT_NAME} ${_tmp_name} PARENT_SCOPE) +endfunction() + +function(qt_download_submodule) + cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "PATCHES" ${ARGN}) + + if(NOT DEFINED _csc_OUT_SOURCE_PATH) + message(FATAL_ERROR "qt_download_module requires parameter OUT_SOURCE_PATH to be set! Please correct the portfile!") + endif() + + vcpkg_buildpath_length_warning(37) + qt_get_submodule_name(NAME) + + set(FULL_VERSION "${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}") + set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + FILENAME ${ARCHIVE_NAME} + SHA512 ${QT_HASH_${PORT}} + ) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE_FILE}" + REF ${FULL_VERSION} + PATCHES ${_csc_PATCHES} + ) + + set(${_csc_OUT_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_cmake.cmake b/ports/qt5-base/cmake/qt_fix_cmake.cmake new file mode 100644 index 00000000000..6da5deb8e14 --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_cmake.cmake @@ -0,0 +1,27 @@ +function(qt_fix_cmake PACKAGE_DIR_TO_FIX PORT_TO_FIX) + set(BACKUP_PATH "$ENV{PATH}") + #Find Python and add it to the path + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + vcpkg_add_to_path("${PYTHON2_EXE_PATH}") + + #Fix the cmake files if they exist + if(EXISTS ${PACKAGE_DIR_TO_FIX}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON2} ${CURRENT_INSTALLED_DIR}/share/qt5/fixcmake.py ${PORT_TO_FIX} + WORKING_DIRECTORY ${PACKAGE_DIR_TO_FIX}/lib/cmake + LOGNAME fix-cmake + ) + endif() + + #Install cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/lib/cmake) + file(MAKE_DIRECTORY ${PACKAGE_DIR_TO_FIX}/share) + file(RENAME ${PACKAGE_DIR_TO_FIX}/lib/cmake ${PACKAGE_DIR_TO_FIX}/share/cmake) + endif() + #Remove extra cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + file(REMOVE_RECURSE ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + endif() + set(ENV{PATH} "${BACKUP_PATH}") +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_makefile_install.cmake b/ports/qt5-base/cmake/qt_fix_makefile_install.cmake new file mode 100644 index 00000000000..95831d29f58 --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_makefile_install.cmake @@ -0,0 +1,26 @@ +#Could probably be a vcpkg_fix_makefile_install for other ports? +function(qt_fix_makefile_install BUILD_DIR) + #Fix the installation location + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + if(WIN32) + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + else() + set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) + set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) + endif() + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + file(GLOB_RECURSE MAKEFILES "${BUILD_DIR}/*Makefile*") + + foreach(MAKEFILE ${MAKEFILES}) + file(READ "${MAKEFILE}" _contents) + #Set the correct install directory to packages + string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_fix_prl.cmake b/ports/qt5-base/cmake/qt_fix_prl.cmake new file mode 100644 index 00000000000..214f7cdb464 --- /dev/null +++ b/ports/qt5-base/cmake/qt_fix_prl.cmake @@ -0,0 +1,10 @@ +function(qt_fix_prl PACKAGE_DIR PRL_FILES) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/lib" CMAKE_LIB_PATH) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/include" CMAKE_INCLUDE_PATH) + foreach(PRL_FILE IN LISTS PRL_FILES) + file(READ "${PRL_FILE}" _contents) + string(REPLACE "${CMAKE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${CMAKE_INCLUDE_PATH}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}") + file(WRITE "${PRL_FILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_install_copyright.cmake b/ports/qt5-base/cmake/qt_install_copyright.cmake new file mode 100644 index 00000000000..0f7e60cc762 --- /dev/null +++ b/ports/qt5-base/cmake/qt_install_copyright.cmake @@ -0,0 +1,16 @@ +#Could probably be the beginning of a vcpkg_install_copyright? +function(qt_install_copyright SOURCE_PATH) + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_port_functions.cmake b/ports/qt5-base/cmake/qt_port_functions.cmake new file mode 100644 index 00000000000..19f53f98bd7 --- /dev/null +++ b/ports/qt5-base/cmake/qt_port_functions.cmake @@ -0,0 +1,14 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +#Basic setup +include(qt_port_hashes) +#Fixup scripts +include(qt_fix_makefile_install) +include(qt_fix_cmake) +include(qt_fix_prl) +#Helper functions +include(qt_download_submodule) +include(qt_build_submodule) +include(qt_install_copyright) + +include(qt_submodule_installation) diff --git a/ports/qt5-base/cmake/qt_port_hashes.cmake b/ports/qt5-base/cmake/qt_port_hashes.cmake new file mode 100644 index 00000000000..bf311a7b635 --- /dev/null +++ b/ports/qt5-base/cmake/qt_port_hashes.cmake @@ -0,0 +1,51 @@ +#Every update requires an update of these hashes and the version within the control file of each of the 32 ports. +#So it is probably better to have a central location for these hashes and let the ports update via a script +set(QT_MAJOR_MINOR_VER 5.12) +set(QT_PATCH_VER 4) + +set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth + purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets + webview winextras xmlpatterns) + +#set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) +set(QT_HASH_qt5-base 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946) +set(QT_HASH_qt5-3d aa93d3661d092dc020e7903242964b7daba1e42882deb0d5fd45abff3c11e971f49a497ae5a1b7420fd497e6986daca4da0a217c94821ef8432cc3d8c617d291) +set(QT_HASH_qt5-activeqt 1a1560424ed8f6075ffe371efaff63ae9aa52377aa84f806a39d7e995960a7d7eeb1eb575470b13569293d2623c5e247204397d8b6698c1ce2ff9f206850a912) +set(QT_HASH_qt5-charts d9c46f59d15377098427647cbd3c3fc2d7ff33fb9940581360db3be5e895b50bee0fe23a41c0af6b157e905b04b1bc13666c1736b047a405b21aab3a2bdbe60b) +set(QT_HASH_qt5-connectivity e1076c5883f29cb394d9929a52c3bfce97952cef11b1f82d1fcca59440354d1a29ab19d628f6359ca02f3318fb526b3ca78d691af6dc0f4c06741b2306c8e571) +set(QT_HASH_qt5-datavis3d e5041e4b666fa4e7ce8b12fd522be3ace144b43bf68fa2d45add67dfc6afc6e5788c5fac5eed81e9fa631cf6d372ce0aed8287fa139488406612322e5fd7e550) +set(QT_HASH_qt5-declarative 953b0dac76b73a7a21b393ab88718da12d77dfc688dc07c55c96ea1658bc14acd9097bef60df4a95d2923d3fb1e02b46499c032aa53844d4fd344b0037514671) +set(QT_HASH_qt5-gamepad e84e637e3b2ced01e92ceb2b54b829a1e2346a4c96b15044f59bcc9764a24c91df6fcd0165f454143cfad87c05471b7d84567d9c6ea8fd3b4c753e5e771e8947) +set(QT_HASH_qt5-graphicaleffects fe78cb01cfbe00226709a7faa2e754abb8e41bd677d15611221fbb9e53bf876e60d244eb6660b6b03403d31be2d9155a763ad34e4c4d2d1490fa6810f54bad0c) +set(QT_HASH_qt5-imageformats e9adab3b7e1f5a0679e1924eb08718f2c6c53073f83018c9243886f7e1b084940bb9a642f46d76fae21552c4a76c655482536ae873cd4cfead4876a3561ebe8f) +set(QT_HASH_qt5-location b03380feb2e6767dabb0a75f9234c52a9adc580d53b692c356b04293195f6cdd49d9c7e8eb91404b5a7e4c7507498078dd8f41de014330d35f0e99e034b8cf3a) +set(QT_HASH_qt5-macextras 813b26a95e0ab7119e3f6341052d08d6b401713cc914fd9a8a43675be21d87135f3ed7538edceec68d16e6cb3eb0042351083b545624e18ea217c23a105185e4) +set(QT_HASH_qt5-mqtt f2c254947d767e30a8ba683ef8f4c14e6aad911cd887e675abadf0f315771b62adababab3831d7712e09a953d9b7e95df6db0f3fc82cb7bb5aad988bdfa127b5) +set(QT_HASH_qt5-multimedia 28eaaf4a704649616cd77ae5560ddd6298c82e525f59fa4d5a0178826fe2d6c9b77dcb067f2b5b56e88da7d6043a3f8e34b5c810d12751c74fdc65e5440586fa) +set(QT_HASH_qt5-networkauth 0f36530393abe5315154bf95d0cae1330a8af1af8af5a525d20336d4227f11aa9133b7e3258f651be6f212593ad7e0d2d5d15536fab3c07392a94f2954afe7c8) +set(QT_HASH_qt5-purchasing 06124d275dcb9c969ccebccd9847c9819eb460ec00b73ab442533dafa8df875c8729148d714555f301da1c273488f8e41ac0b176f11cfadba4e121e3230579da) +set(QT_HASH_qt5-quickcontrols 315f711d856a4f2882c4e60435bd5fc77623b4ba3bd10fea8e8d052e0a183556c4b5342236b18fade0bbae3a45df8b1426a26a87b1d7b071bb3e5846585775f6) +set(QT_HASH_qt5-quickcontrols2 41e44ee733ef3ac5021543407b472750c7b8d61bdeb6960d043477f0c5604699cafb5cca4f755a26ce3cfef1f948e85bb85623ecd21e70c876bd5a8c1f5547bf) +set(QT_HASH_qt5-remoteobjects 6297af20b6d73cafb29a3c9d000be51b7b4a668163c0d2796cd51d8d292759a9ea0a8beeff4ace6590a22b94eea51350142510d52a8b4ca73594508c204e4b58) +set(QT_HASH_qt5-script 6d3b802c7cdfb270318b9210df4ad9dbd2d29f485d9194051dbf278a48c25cc5c6311adeaf56b4fe2a7746dbc10234544e75e61a2e9c86f653aed0a92e07e717) +set(QT_HASH_qt5-scxml 45bf18c1bece80120b2a8f81357afda86584ad5455a49b0db0658b4dd7f0a4ef53c7cc7ef8fff26842f476661b162752db7e8a48ed3566342ad0c1537d4ac8f9) +set(QT_HASH_qt5-sensors 39bc6b2a435dd54d574f6c19ccc15698f8ade3f2b64170baa3e0d0bd24f64bc16a9088620a6be41a61ed170bd84d4795bf2819b40a188c5c2255a54d0e466035) +set(QT_HASH_qt5-serialport c51fa5eca92a16c41678eef37c3e33c6ea7f61ad881dd309548b83bafa3fedf191afc324437863dcf1a35dafc512363e7588f65136c07ad8f0d51c6854da178f) +set(QT_HASH_qt5-speech 85f77f32d2a3fc28262fa0af2dc1ff13c572835bff8fef3a79b4af0efdee0fc325754e1803d98ce25042fd717de28f3ecb3cc916de729cbb267c14be136007a9) +set(QT_HASH_qt5-svg 40d7dc82e0acde52e1258e1b1753cc93609c31cf69057c52dc2dd30dc59f2d7d434e20fa4f7f27db3fa300fd3c8f23a8fb03cc26b27cc1c02cc3bf6d97383503) +set(QT_HASH_qt5-tools 072d09315fc73ec610d2e0d9a1380e5539a79fa1d73104a801e0f8b9afe489b735fefcc46d7c9e519ee8c1b14975386260239be24183933281dead2fec00f466) +set(QT_HASH_qt5-virtualkeyboard 04960c475a01f65901279fdab352742e4dc77753a306c7bd9996cf32be4a63524e7be034d60b398c6862c0099b02eedcef89f28fd09b1c7fa3075f89adba5a7a) +set(QT_HASH_qt5-webchannel 956c57c019623a2ccc4b4a7fc8ca2404a04862b7a3fdb8d1317dfd0d24d00f73db4698df22a9758667256646129163ea1b3a588435aa01f28e72e35300637458) +set(QT_HASH_qt5-websockets b5abd39664f07afe08805876980bc3850a83a032462a7b73e9d5c5458a2f195df85ec903e8a16bf93bde6089ec90ab9b930ea6b1ebb0d99d0955ad36de0613dd) +set(QT_HASH_qt5-webview c7d5b5225a7edcf642249eb68f0db52ec56cd071f1e17e1f846a210f48229e71c649d99323dc70e9d3bcdca925b0ae1d9c56282d6b31398478ef024b22835fc7) +set(QT_HASH_qt5-winextras 4d972884bce7736d2a6e6b8d61291647cdf54a175cb6d0fca102e389074084e0f3d25dec35b2b8df2188760ebeee4b2b7f0158ebc37a0c6c1e208d7b10d2a778) +set(QT_HASH_qt5-xmlpatterns 769fb26b1b72bbe3a1fc0c13dee6f12c4bc5280824954194e676331082af91aacecd2c295aa2e566365f4679f19732b1caa3da18825e3560b402b86568b3ac4e) + +if(QT_UPDATE_VERSION) + foreach(_current_qt_port ${QT_PORT_LIST}) + set(_current_control "${VCPKG_ROOT_DIR}/ports/qt5-${_current_qt_port}/CONTROL") + file(READ ${_current_control} _control_contents) + string(REGEX REPLACE "Version: [0-9]\.[0-9]+\.[0-9]" "Version: ${QT_MAJOR_MINOR_VER}.${QT_MAJOR_MINOR_VER}" _control_contents "${_control_contents}") + file(WRITE ${_current_control} "${_control_contents}") + endforeach() +endif() \ No newline at end of file diff --git a/ports/qt5-base/cmake/qt_submodule_installation.cmake b/ports/qt5-base/cmake/qt_submodule_installation.cmake new file mode 100644 index 00000000000..f604a8f0b86 --- /dev/null +++ b/ports/qt5-base/cmake/qt_submodule_installation.cmake @@ -0,0 +1,7 @@ + + +function(qt_submodule_installation) + qt_download_submodule(OUT_SOURCE_PATH TARGET_SOURCE_PATH ${ARGV}) + qt_build_submodule(${TARGET_SOURCE_PATH}) + qt_install_copyright(${TARGET_SOURCE_PATH}) +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake deleted file mode 100644 index c396235625a..00000000000 --- a/ports/qt5-base/configure_qt.cmake +++ /dev/null @@ -1,72 +0,0 @@ -function(configure_qt) - cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - if(NOT _csc_PLATFORM) - message(FATAL_ERROR "configure_qt requires a PLATFORM argument.") - endif() - - vcpkg_find_acquire_program(PERL) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_add_to_path("${PERL_EXE_PATH}") - - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS "-static") - endif() - - if(VCPKG_CRT_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS "-static-runtime") - endif() - - if(CMAKE_HOST_WIN32) - set(CONFIGURE_BAT "configure.bat") - else() - set(CONFIGURE_BAT "configure") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -debug - -prefix ${CURRENT_INSTALLED_DIR}/debug - -extprefix ${CURRENT_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -plugindir ${CURRENT_INSTALLED_DIR}/debug/plugins - -qmldir ${CURRENT_INSTALLED_DIR}/debug/qml - -headerdir ${CURRENT_PACKAGES_DIR}/include - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${_csc_PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -release - -prefix ${CURRENT_INSTALLED_DIR} - -extprefix ${CURRENT_PACKAGES_DIR} - -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 - -archdatadir ${CURRENT_INSTALLED_DIR}/share/qt5 - -datadir ${CURRENT_INSTALLED_DIR}/share/qt5 - -plugindir ${CURRENT_INSTALLED_DIR}/plugins - -qmldir ${CURRENT_INSTALLED_DIR}/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${_csc_PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - -endfunction() diff --git a/ports/qt5-base/fix-system-freetype.patch b/ports/qt5-base/fix-system-freetype.patch deleted file mode 100644 index d83fc98913b..00000000000 --- a/ports/qt5-base/fix-system-freetype.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- - src/gui/configure.json | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/gui/configure.json b/src/gui/configure.json -index 0332631e..bd64b7b1 100644 ---- a/src/gui/configure.json -+++ b/src/gui/configure.json -@@ -164,8 +164,7 @@ - }, - "sources": [ - { "type": "pkgConfig", "args": "freetype2" }, -- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, -- { "type": "freetype", "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" } -+ { "libs": "-lfreetype" } - ] - }, - "fontconfig": { diff --git a/ports/qt5-base/fix-system-pcre2-linux.patch b/ports/qt5-base/fix-system-pcre2-linux.patch deleted file mode 100644 index 92bdf04cec8..00000000000 --- a/ports/qt5-base/fix-system-pcre2-linux.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json ---- a/src/corelib/configure.json 2018-08-23 02:58:54.544949500 -0400 -+++ b/src/corelib/configure.json 2018-08-23 02:59:31.481175300 -0400 -@@ -181,8 +181,10 @@ - "builds": { - "debug": "-lpcre2-16d", - "release": "-lpcre2-16" -- } -- } -+ }, -+ "condition": "config.win32" -+ }, -+ { "libs": "-lpcre2-16", "condition": "!config.win32" } - ] - }, - "pps": { diff --git a/ports/qt5-base/fix-system-pcre2.patch b/ports/qt5-base/fix-system-pcre2.patch deleted file mode 100644 index 5e8d4616e87..00000000000 --- a/ports/qt5-base/fix-system-pcre2.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur a/src/corelib/configure.json b/src/corelib/configure.json ---- a/src/corelib/configure.json 2018-06-15 03:29:31.000000000 -0400 -+++ b/src/corelib/configure.json 2018-08-23 00:46:04.380187100 -0400 -@@ -177,7 +177,12 @@ - }, - "sources": [ - { "type": "pkgConfig", "args": "libpcre2-16" }, -- "-lpcre2-16" -+ { -+ "builds": { -+ "debug": "-lpcre2-16d", -+ "release": "-lpcre2-16" -+ } -+ } - ] - }, - "pps": { diff --git a/ports/qt5-base/fixcmake.py b/ports/qt5-base/fixcmake.py index bcfb12ac592..afb127560a0 100644 --- a/ports/qt5-base/fixcmake.py +++ b/ports/qt5-base/fixcmake.py @@ -1,22 +1,29 @@ import os import re +import sys from glob import glob +port="qt5" +if len(sys.argv) > 1: + port=sys.argv[1] + files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] +tooldir="/tools/"+port+"/bin/" for f in files: openedfile = open(f, "r") builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d+(.dll|.so)") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d+(.lib|.a)") + exepattern = re.compile("_install_prefix}/bin/[a-z]+(.exe|)") + toolexepattern = re.compile("_install_prefix}/tools/qt5/bin/[a-z]+(.exe|)") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/bin/Qt5.*d+(.dll|.so)") for line in openedfile: if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += "\n " + line.replace("/tools/qt5/bin", "/bin/") builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += "\n " + line.replace("/tools/qt5/debug/bin", "/debug/bin/") builder += " endif()\n" elif "_install_prefix}/bin/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" @@ -58,11 +65,13 @@ for f in files: elif libpattern.search(line) != None: builder += line.replace("/lib/", "/debug/lib/") elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") + builder += line.replace("/tools/qt5/bin", "/debug/bin/") elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") + builder += line.replace("/bin/", tooldir) + elif toolexepattern.search(line) != None: + builder += line.replace("/tools/qt5/bin/",tooldir) else: builder += line new_file = open(f, "w") new_file.write(builder) - new_file.close() \ No newline at end of file + new_file.close() diff --git a/ports/qt5-base/install_qt.cmake b/ports/qt5-base/install_qt.cmake deleted file mode 100644 index 4eed6cbe5c1..00000000000 --- a/ports/qt5-base/install_qt.cmake +++ /dev/null @@ -1,80 +0,0 @@ -function(install_qt) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) - - if (_bc_DISABLE_PARALLEL) - set(NUMBER_OF_PROCESSORS "1") - else() - if(DEFINED ENV{NUMBER_OF_PROCESSORS}) - set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) - else() - execute_process( - COMMAND nproc - OUTPUT_VARIABLE NUMBER_OF_PROCESSORS - ) - string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") - endif() - endif() - - if(CMAKE_HOST_WIN32) - vcpkg_find_acquire_program(JOM) - set(INVOKE "${JOM}" /J ${NUMBER_OF_PROCESSORS}) - else() - find_program(MAKE make) - set(INVOKE "${MAKE}" -j${NUMBER_OF_PROCESSORS}) - endif() - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") - - if (CMAKE_HOST_WIN32) - # flex and bison for ANGLE library - vcpkg_find_acquire_program(FLEX) - get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY) - get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME) - - file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" ) - set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}") - file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe") - file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe") - vcpkg_add_to_path("${FLEX_TEMP}") - endif() - - set(_path "$ENV{PATH}") - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") - vcpkg_execute_required_process( - COMMAND ${INVOKE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${INVOKE} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Package ${TARGET_TRIPLET}-rel") - set(ENV{PATH} "${_path}") - vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") - vcpkg_execute_required_process( - COMMAND ${INVOKE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) - vcpkg_execute_required_process( - COMMAND ${INVOKE} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - endif() - - set(ENV{PATH} "${_path}") - -endfunction() diff --git a/ports/qt5-base/patches/gui_configure.patch b/ports/qt5-base/patches/gui_configure.patch new file mode 100644 index 00000000000..31c29dbeb77 --- /dev/null +++ b/ports/qt5-base/patches/gui_configure.patch @@ -0,0 +1,16 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index c51e3ceee..7f7e206b6 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -239,9 +239,9 @@ + "headers": "ft2build.h", + "sources": [ + { "type": "pkgConfig", "args": "freetype2" }, +- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, ++ { "type": "freetype", "libs": "-lbreakfreetypeautofind", "condition": "!config.wasm" }, + { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" }, +- { "libs": "-lfreetype" } ++ { "libs": "-lbreakfreetypeautofind" } + ], + "use": [ + { "lib": "zlib", "condition": "features.system-zlib" } diff --git a/ports/qt5-base/patches/qt_app.patch b/ports/qt5-base/patches/qt_app.patch new file mode 100644 index 00000000000..e04446bf224 --- /dev/null +++ b/ports/qt5-base/patches/qt_app.patch @@ -0,0 +1,17 @@ +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index 8354f30e..8f24b72e 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -27,10 +27,11 @@ host_build:force_bootstrap { + QT -= core core-private xml + QT += bootstrap-private + } + target.path = $$[QT_HOST_BINS] ++ CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } else { + !build_pass:qtConfig(debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$[QT_HOST_BINS] + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target diff --git a/ports/qt5-base/patches/static_opengl.patch b/ports/qt5-base/patches/static_opengl.patch new file mode 100644 index 00000000000..51818b8b7cd --- /dev/null +++ b/ports/qt5-base/patches/static_opengl.patch @@ -0,0 +1,62 @@ +diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf +index f21848f94..202c49688 100644 +--- a/mkspecs/features/win32/opengl.prf ++++ b/mkspecs/features/win32/opengl.prf +@@ -30,7 +30,7 @@ qtConfig(opengles2) { + LIBS += $$QMAKE_LIBS_OPENGL_ES2 + QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE + } +- qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ++ qtConfig(static): DEFINES += _GDI32_ GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + } else { + !qtConfig(dynamicgl) { + QMAKE_LIBS += $$QMAKE_LIBS_OPENGL +diff --git a/src/angle/src/common/gles_common.pri b/src/angle/src/common/gles_common.pri +index 70b65dd4c..1dcc96af5 100644 +--- a/src/angle/src/common/gles_common.pri ++++ b/src/angle/src/common/gles_common.pri +@@ -23,7 +23,8 @@ for(libname, STATICLIBS) { + PRE_TARGETDEPS += $$staticlib + } + +-DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= ++!qtConfig(static): DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION ++qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + !winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK + + QT_FOR_CONFIG += gui-private +diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h +index aa1221a86..a49ee4f6d 100644 +--- a/src/3rdparty/angle/include/platform/Platform.h ++++ b/src/3rdparty/angle/include/platform/Platform.h +@@ -12,7 +12,7 @@ + #include + #include + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(ANGLE_PLATFORM_EXPORT) + # if !defined(LIBANGLE_IMPLEMENTATION) + # define ANGLE_PLATFORM_EXPORT __declspec(dllimport) + # else +diff --git a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +index d4459ec28..d1416041e 100644 +--- a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +@@ -3505,7 +3505,7 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, +@@ -3530,7 +3530,7 @@ GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum targe + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, diff --git a/ports/qt5-base/patches/windows_prf.patch b/ports/qt5-base/patches/windows_prf.patch new file mode 100644 index 00000000000..6051daae8fa --- /dev/null +++ b/ports/qt5-base/patches/windows_prf.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf +index 272170d4..70b8ea2e 100644 +--- a/mkspecs/features/win32/windows.prf ++++ b/mkspecs/features/win32/windows.prf +@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app") { + + qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) { + isEqual(entryLib, -lqtmain) { +- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB ++ lib = $$QT.core.libs/manual-link/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB + PRE_TARGETDEPS += $$lib + QMAKE_LIBS += $$lib + } else { diff --git a/ports/qt5-base/patches/winmain_pro.patch b/ports/qt5-base/patches/winmain_pro.patch new file mode 100644 index 00000000000..66460ccd6f1 --- /dev/null +++ b/ports/qt5-base/patches/winmain_pro.patch @@ -0,0 +1,27 @@ +diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro +index 9cb6ab0c..52c7876e 100644 +--- a/src/winmain/winmain.pro ++++ b/src/winmain/winmain.pro +@@ -3,7 +3,7 @@ + + TEMPLATE = lib + TARGET = qtmain +-DESTDIR = $$QT.core.libs ++DESTDIR = $$QT.core.libs/manual-link + + CONFIG += static + QT = core +@@ -27,7 +27,12 @@ winrt { + } + + load(qt_installs) +- ++!qt_no_install_library { ++ host_build: \ ++ target.path = $$[QT_HOST_LIBS]/manual-link ++ else: \ ++ target.path = $$[QT_INSTALL_LIBS]/manual-link ++} + TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end + + load(qt_targets) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index c53d30e5b13..9bda7115d97 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -1,258 +1,268 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) -endif() +vcpkg_buildpath_length_warning(37) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) + +include(qt_port_functions) include(configure_qt) include(install_qt) -set(MAJOR_MINOR 5.12) -set(FULL_VERSION ${MAJOR_MINOR}.3) -set(ARCHIVE_NAME "qtbase-everywhere-src-${FULL_VERSION}.tar.xz") +######################### +## Find Host and Target mkspec name for configure +include(find_qt_mkspec) +find_qt_mkspec(TARGET_MKSPEC HOST_MKSPEC HOST_TOOLS) +set(QT_PLATFORM_CONFIGURE_OPTIONS TARGET_PLATFORM ${TARGET_MKSPEC}) +if(DEFINED HOST_MKSPEC) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${HOST_MKSPEC}) +endif() +if(DEFINED HOST_TOOLS) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_TOOLS_ROOT ${HOST_TOOLS}) +endif() -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" - FILENAME ${ARCHIVE_NAME} - SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 -) -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE_FILE}" - REF ${FULL_VERSION} -) +######################### +## Downloading Qt5-Base + +qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH + PATCHES + patches/winmain_pro.patch #Moves qtmain to manual-link + patches/windows_prf.patch #fixes the qtmain dependency due to the above move + patches/qt_app.patch #Moves the target location of qt5 host apps to always install into the host dir. + patches/gui_configure.patch #Patches the gui configure.json to break freetype autodetection because it does not include its dependencies. + #patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static). + #Be carefull since it requires definining _GDI32_ for all dependent projects due to redefinition errors in the + #the windows supplied gl.h header and the angle gl.h otherwise. + ) # Remove vendored dependencies to ensure they are not picked up by the build -foreach(DEPENDENCY freetype zlib harfbuzzng libjpeg libpng double-conversion sqlite) +foreach(DEPENDENCY freetype zlib harfbuzz-ng libjpeg libpng double-conversion sqlite pcre2) if(EXISTS ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) file(REMOVE_RECURSE ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) endif() endforeach() - file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) +######################### +## Setup Configure options + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") set(CORE_OPTIONS -confirm-license -opensource + #-no-fontconfig + #-simulator_and_device + #-ltcg + #-combined-angle-lib + # ENV ANGLE_DIR to external angle source dir. (Will always be compiled with Qt) + #-optimized-tools + #-force-debug-info + #-verbose +) + +## 3rd Party Libs +list(APPEND CORE_OPTIONS -system-zlib -system-libjpeg -system-libpng - -system-freetype + -system-freetype # static builds require to also link its dependent bzip! -system-pcre -system-doubleconversion -system-sqlite - -system-harfbuzz - -no-fontconfig - -nomake examples - -nomake tests -) + -system-harfbuzz) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND CORE_OPTIONS - -static - ) +find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(LIBPNG_RELEASE NAMES png16 libpng16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #Depends on zlib +find_library(LIBPNG_DEBUG NAMES png16 png16d libpng16 libpng16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(PSQL_RELEASE NAMES pq libpq PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(PSQL_DEBUG NAMES pq libpq pqd libpqd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(PCRE2_RELEASE NAMES pcre2-16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(PCRE2_DEBUG NAMES pcre2-16 pcre2-16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(FREETYPE_RELEASE NAMES freetype PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #zlib, bzip2, libpng +find_library(FREETYPE_DEBUG NAMES freetype freetyped PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_RELEASE NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_DEBUG NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_RELEASE NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_DEBUG NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(SQLITE_DEBUG NAMES sqlite3 sqlite3d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +#Dependent libraries +find_library(BZ2_RELEASE bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BZ2_DEBUG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SSL_RELEASE ssl ssleay32 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(SSL_DEBUG ssl ssleay32 ssld ssleay32d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(EAY_RELEASE libeay32 crypto libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(EAY_DEBUG libeay32 crypto libcrypto libeay32d cryptod libcryptod PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +set(RELEASE_OPTIONS + "LIBJPEG_LIBS=${JPEG_RELEASE}" + "ZLIB_LIBS=${ZLIB_RELEASE}" + "LIBPNG_LIBS=${LIBPNG_RELEASE} ${ZLIB_RELEASE}" + "PCRE2_LIBS=${PCRE2_RELEASE}" + "FREETYPE_LIBS=${FREETYPE_RELEASE} ${BZ2_RELEASE} ${LIBPNG_RELEASE} ${ZLIB_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${BZ2_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_RELEASE}" + ) +set(DEBUG_OPTIONS + "LIBJPEG_LIBS=${JPEG_DEBUG}" + "ZLIB_LIBS=${ZLIB_DEBUG}" + "LIBPNG_LIBS=${LIBPNG_DEBUG} ${ZLIB_DEBUG}" + "PCRE2_LIBS=${PCRE2_DEBUG}" + "FREETYPE_LIBS=${FREETYPE_DEBUG} ${BZ2_DEBUG} ${LIBPNG_DEBUG} ${ZLIB_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${BZ2_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_DEBUG}" + ) + + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + list(APPEND CORE_OPTIONS -appstore-compliant) + endif() + if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + list(APPEND CORE_OPTIONS -opengl dynamic) # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" and "-opengel es2" + else() + list(APPEND CORE_OPTIONS -opengl dynamic) # other possible option without moving angle dlls: "-opengl desktop". "-opengel es2" only works with commented patch + endif() + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + "SQLITE_LIBS=${SQLITE_RELEASE}" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE}" + ) + + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + "SQLITE_LIBS=${SQLITE_DEBUG}" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG}" + ) +elseif(VCPKG_TARGET_IS_LINUX) + if (NOT EXISTS "/usr/include/GL/glu.h") + message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev libglu1-mesa-dev\"") + endif() + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE}" + ) + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG}" + ) +elseif(VCPKG_TARGET_IS_OSX) + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + else() + execute_process(COMMAND xcrun --show-sdk-version + OUTPUT_FILE OSX_SDK_VER.txt + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + FILE(STRINGS "${CURRENT_BUILDTREES_DIR}/OSX_SDK_VER.txt" VCPKG_OSX_DEPLOYMENT_TARGET REGEX "^[0-9][0-9]\.[0-9][0-9]*") + message(STATUS "Detected OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + string(REGEX MATCH "^[0-9][0-9]\.[0-9][0-9]*" VCPKG_OSX_DEPLOYMENT_TARGET ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Major.Minor OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.14") # Max Version supported by QT + message(STATUS "Qt 5.12.4 only support OSX_DEPLOYMENT_TARGET up to 10.14") + set(VCPKG_OSX_DEPLOYMENT_TARGET "10.14") + endif() + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Enviromnent OSX SDK Version: $ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET}") + FILE(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents) + string(REPLACE "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12" "QMAKE_MACOSX_DEPLOYMENT_TARGET = ${VCPKG_OSX_DEPLOYMENT_TARGET}" _tmp_contents ${_tmp_contents}) + FILE(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents}) + endif() + #list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC}) + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} -framework ApplicationServices" + ) + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} -framework ApplicationServices" + ) endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(PLATFORM "win32-msvc") +## Do not build tests or examples +list(APPEND CORE_OPTIONS + -nomake examples + -nomake tests) - configure_qt( - SOURCE_PATH ${SOURCE_PATH} - PLATFORM ${PLATFORM} - OPTIONS - ${CORE_OPTIONS} - -mp - -opengl dynamic # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" - OPTIONS_RELEASE - LIBJPEG_LIBS="-ljpeg" - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - PSQL_LIBS="-llibpq" - PCRE2_LIBS="-lpcre2-16" - FREETYPE_LIBS="-lfreetype" - OPTIONS_DEBUG - LIBJPEG_LIBS="-ljpegd" - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PSQL_LIBS="-llibpqd" - PCRE2_LIBS="-lpcre2-16d" - FREETYPE_LIBS="-lfreetyped" - ) - -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - if (NOT EXISTS "/usr/include/GL/glu.h") - message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev\" and \"apt-get install libglu1-mesa-dev\"") - endif() - - configure_qt( - SOURCE_PATH ${SOURCE_PATH} - PLATFORM "linux-g++" - OPTIONS - ${CORE_OPTIONS} - OPTIONS_RELEASE - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread" - OPTIONS_DEBUG - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread" - ) - -elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") configure_qt( SOURCE_PATH ${SOURCE_PATH} - PLATFORM "macx-clang" - OPTIONS - ${CORE_OPTIONS} - OPTIONS_RELEASE - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread" - "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/lib/libharfbuzz.a -framework ApplicationServices" - OPTIONS_DEBUG - "LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" - "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" - "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a" - "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread" - "SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread" - "HARFBUZZ_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libharfbuzz.a -framework ApplicationServices" -) -endif() + ${QT_PLATFORM_CONFIGURE_OPTIONS} + OPTIONS ${CORE_OPTIONS} + OPTIONS_RELEASE ${RELEASE_OPTIONS} + OPTIONS_DEBUG ${DEBUG_OPTIONS} + ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - install_qt(DISABLE_PARALLEL) # prevent race condition on Mac -else() - install_qt() -endif() +install_qt() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +######################### +#TODO: Make this a function since it is also done by modular scripts! +# e.g. by patching mkspecs/features/qt_tools.prf somehow +file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/mkspecs/*.pri" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/mkspecs/*.pri") + +file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/include" CMAKE_INCLUDE_PATH) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") - list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") - file(INSTALL ${BINARY_TOOLS} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) - file(REMOVE ${BINARY_TOOLS}) - - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) + qt_fix_prl("${CURRENT_INSTALLED_DIR}" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*") - list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") - file(REMOVE ${BINARY_TOOLS}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") - endif() - - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) + qt_fix_prl("${CURRENT_INSTALLED_DIR}/debug" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) endif() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # TODO: check if important debug information for cmake is lost + +#This needs a new VCPKG policy. +if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_LIBRARY_LINKAGE} MATCHES "static") # Move angle dll libraries + message(STATUS "Moving ANGLE dlls from /bin to /tools/qt5-angle/bin. In static builds dlls are not allowed in /bin") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/bin) + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug/bin) + endif() +endif() + +#TODO: Replace python script with cmake script vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake LOGNAME fix-cmake ) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) - -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) - #--------------------------------------------------------------------------- - # qtmain(d) vs. Qt5AxServer(d) - #--------------------------------------------------------------------------- - # Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), - # never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. - # - # Create manual-link folders: - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - endif() - # - # Either have users explicitly link against qtmain.lib, qtmaind.lib: - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) - endif() - - #--------------------------------------------------------------------------- - # Qt5Bootstrap: only used to bootstrap qmake dependencies - #--------------------------------------------------------------------------- - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.lib ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5Bootstrap.prl ${CURRENT_PACKAGES_DIR}/tools/qt5/Qt5Bootstrap.prl) - endif() - #--------------------------------------------------------------------------- -endif() - -file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) -endif() -foreach(PRL_FILE IN LISTS PRL_FILES) - file(READ "${PRL_FILE}" _contents) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - endif() - file(WRITE "${PRL_FILE}" "${_contents}") -endforeach() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) -endif() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5core) -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -# +if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/tools/qt5/bin DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5/bin) +endif() + +qt_install_copyright(${SOURCE_PATH}) + +#install scripts for other qt ports +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_functions.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_makefile_install.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_cmake.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_prl.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_download_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_build_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_copyright.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_submodule_installation.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5 +) diff --git a/ports/qt5-base/qt_debug.conf b/ports/qt5-base/qt_debug.conf deleted file mode 100644 index d0b17866161..00000000000 --- a/ports/qt5-base/qt_debug.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = debug/lib -Binaries = debug/tools/qt5 -LibraryExecutables = debug/tools/qt5 -Plugins = debug/plugins -Qml2Imports = debug/qml -Data = share/qt5/debug -ArchData = share/qt5/debug -HostData = share/qt5/debug -HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5-base/qt_release.conf b/ports/qt5-base/qt_release.conf deleted file mode 100644 index a04aef52546..00000000000 --- a/ports/qt5-base/qt_release.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = lib -Binaries = tools/qt5 -LibraryExecutables = tools/qt5 -Plugins = plugins -Qml2Imports = qml -Data = share/qt5 -ArchData = share/qt5 -HostData = share/qt5 -HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5-charts/CONTROL b/ports/qt5-charts/CONTROL index 849ee2af694..9207bc05b33 100644 --- a/ports/qt5-charts/CONTROL +++ b/ports/qt5-charts/CONTROL @@ -1,4 +1,4 @@ Source: qt5-charts -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-charts/portfile.cmake b/ports/qt5-charts/portfile.cmake index 0d7b7f17096..214726759f3 100644 --- a/ports/qt5-charts/portfile.cmake +++ b/ports/qt5-charts/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtcharts f5940589c7a2dc5fcd3484397613f13ab41311c8ffb70a3484e64dc5bad24e18c94c9ebbe6716c1ec7c81b7863113ebfdb593f2d194608b2e3fb0b0b5c9c9102) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-connectivity/CONTROL b/ports/qt5-connectivity/CONTROL index bd169d40d5c..821c5980a03 100644 --- a/ports/qt5-connectivity/CONTROL +++ b/ports/qt5-connectivity/CONTROL @@ -1,4 +1,4 @@ Source: qt5-connectivity -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-connectivity/portfile.cmake b/ports/qt5-connectivity/portfile.cmake index 5cc8777e514..2cd1cf47965 100644 --- a/ports/qt5-connectivity/portfile.cmake +++ b/ports/qt5-connectivity/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtconnectivity 4da406d88c3cf216d53c524d3896f50b19dae124baec904233dbb67163a30a955dee29148b5f5b71c35cb28638912423bb1cf4d38c62aeefa7353bd29e97a269) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-datavis3d/CONTROL b/ports/qt5-datavis3d/CONTROL index 0957b7d2c03..617dc58e15f 100644 --- a/ports/qt5-datavis3d/CONTROL +++ b/ports/qt5-datavis3d/CONTROL @@ -1,4 +1,4 @@ Source: qt5-datavis3d -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-datavis3d/portfile.cmake b/ports/qt5-datavis3d/portfile.cmake index cc9df8c4ac2..214726759f3 100644 --- a/ports/qt5-datavis3d/portfile.cmake +++ b/ports/qt5-datavis3d/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdatavis3d cb295deb9aa33132294d7d7f4daaa53dd9ab4815e2d3a2c916d88e1882e018a49d8d66db9088f69375d8da759a3f3566f251802aaba82d74cad2eb45d9bbbcff) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-declarative/CONTROL b/ports/qt5-declarative/CONTROL index 9b9c79e629f..e54bca0a1c9 100644 --- a/ports/qt5-declarative/CONTROL +++ b/ports/qt5-declarative/CONTROL @@ -1,4 +1,4 @@ -Source: qt5-declarative -Version: 5.12.3-2 -Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. -Build-Depends: qt5-modularscripts, qt5-base +Source: qt5-declarative +Version: 5.12.4 +Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. +Build-Depends: qt5-base diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 4c1a11b2481..2cd1cf47965 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -1,25 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdeclarative 0caddcfee36cbf52bacd3a400d304511255715e2b5a58c1621ca8120610427c57511785457a9e7fa55975b86e7924a3cffddeb7e2e8e6622af85b7ebac35dd20) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/plugins/platforminputcontexts) - -if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(qt5decpath ${CURRENT_PACKAGES_DIR}/share/qt5/debug/mkspecs/modules/qt_lib_qmldevtools_private.pri) - file(READ "${qt5decpath}" _contents) - string(REPLACE [[QT.qmldevtools_private.libs = $$QT_MODULE_HOST_LIB_BASE]] [[QT.qmldevtools_private.libs = $$QT_MODULE_LIB_BASE]] _contents "${_contents}") - file(WRITE "${qt5decpath}" "${_contents}") -endif() - -# Copy qt5-declarative tools -# This is a temporary workaround and hope to fix and remove it after the version update. -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") - if (EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/) - file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/ ${CURRENT_PACKAGES_DIR}/tools/qt5/) - endif() - if (EXISTS ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/libQt5QmlDevTools.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - endif() -endif() \ No newline at end of file +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-gamepad/CONTROL b/ports/qt5-gamepad/CONTROL index 9eb19b81f77..2998761b514 100644 --- a/ports/qt5-gamepad/CONTROL +++ b/ports/qt5-gamepad/CONTROL @@ -1,4 +1,4 @@ Source: qt5-gamepad -Version: 5.12.3-2 +Version: 5.12.4 Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-gamepad/portfile.cmake b/ports/qt5-gamepad/portfile.cmake index 71bc355174c..214726759f3 100644 --- a/ports/qt5-gamepad/portfile.cmake +++ b/ports/qt5-gamepad/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtgamepad fd4902b11021eb6b28b5d6e31e9857ddaace6de05106c665fa429223033e28f187ede5deaec6a7e27588c5db4fb1cc250a936f2ee2cadb24f1df31ddfc4b3123) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL index 80730b0fe04..e9667a0ff9e 100644 --- a/ports/qt5-graphicaleffects/CONTROL +++ b/ports/qt5-graphicaleffects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-graphicaleffects -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 GraphicalEffects Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-graphicaleffects/portfile.cmake b/ports/qt5-graphicaleffects/portfile.cmake index c639e46685e..d473c56257a 100644 --- a/ports/qt5-graphicaleffects/portfile.cmake +++ b/ports/qt5-graphicaleffects/portfile.cmake @@ -1,7 +1,3 @@ -SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtgraphicaleffects 3c5e6d7dc51a92d48cce8424ab1fe60ee75b71ebe2e6bb22e719a35bdaf2210b03f90ac066569f5c086ed67ed1463510625307328299310fad7c587e9fd8b385) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-imageformats/CONTROL b/ports/qt5-imageformats/CONTROL index 40df95dbeb2..1d0c6537be7 100644 --- a/ports/qt5-imageformats/CONTROL +++ b/ports/qt5-imageformats/CONTROL @@ -1,4 +1,4 @@ Source: qt5-imageformats -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-imageformats/portfile.cmake b/ports/qt5-imageformats/portfile.cmake index 1d66c9a2356..d473c56257a 100644 --- a/ports/qt5-imageformats/portfile.cmake +++ b/ports/qt5-imageformats/portfile.cmake @@ -1,7 +1,3 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtimageformats 59cc9df597e6ac31b10ff7440b0793af13ee84a1b363db631a7aeea7413e650a99a42e8c3f4633926ec93d4ac4c2532674ea27df325ba98132bea83c81d6e6cc) - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-location/CONTROL b/ports/qt5-location/CONTROL index a6f469fc8e6..e5ca4dc4f34 100644 --- a/ports/qt5-location/CONTROL +++ b/ports/qt5-location/CONTROL @@ -1,4 +1,4 @@ Source: qt5-location -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Location Module - Displays map, navigation, and place content in a QML application. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-location/portfile.cmake b/ports/qt5-location/portfile.cmake index 55e7b23ce53..214726759f3 100644 --- a/ports/qt5-location/portfile.cmake +++ b/ports/qt5-location/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtlocation 91b21e5bc78b960f15c60ae02827cd35292ab1a5dd5a47488d25ce6758177f0ce15545aef3ff9bd1456c6fd84f65cb74d385b726239e2f0be66de0f6fb9a7082) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-macextras/CONTROL b/ports/qt5-macextras/CONTROL index 7489191f32d..c9e444cfff3 100644 --- a/ports/qt5-macextras/CONTROL +++ b/ports/qt5-macextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-macextras -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Mac Extras Module. Provides platform-specific APIs for mac. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-macextras/portfile.cmake b/ports/qt5-macextras/portfile.cmake index 676f0b23ee0..9af7a2aace4 100644 --- a/ports/qt5-macextras/portfile.cmake +++ b/ports/qt5-macextras/portfile.cmake @@ -1,9 +1,5 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") message(FATAL_ERROR "qt5-macextras only support OSX.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtmacextras 56887c2a2d20c41a133af87aec8975e17c6335ffc51093f23a904e02a78f59a8117c7932827ca5dd33f538360e6fd9cfc9d0091c6f4c1e0b96528b5324c74033) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index a3751b61bec..cff6939e6b6 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2019-04-30-1 -Description: Vcpkg helpers to package qt5 modules +Version: deprecated +Description: now part of qt5-base, formerly vcpkg helpers to package qt5 modules \ No newline at end of file diff --git a/ports/qt5-modularscripts/fixcmake.py b/ports/qt5-modularscripts/fixcmake.py deleted file mode 100644 index 83a40ec6c7f..00000000000 --- a/ports/qt5-modularscripts/fixcmake.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -import re -import sys -from glob import glob - -port="qt5" -if len(sys.argv) > 1: - port=sys.argv[1] - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] -tooldir="/tools/"+port+"/" - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - toolexepattern = re.compile("_install_prefix}/tools/qt5/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", tooldir) - elif toolexepattern.search(line) != None: - builder += line.replace("/tools/qt5/",tooldir) - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() diff --git a/ports/qt5-modularscripts/portfile.cmake b/ports/qt5-modularscripts/portfile.cmake index e7149adfcef..0015715fb66 100644 --- a/ports/qt5-modularscripts/portfile.cmake +++ b/ports/qt5-modularscripts/portfile.cmake @@ -1,9 +1 @@ -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts -) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "") - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake deleted file mode 100644 index e58d0bf919b..00000000000 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ /dev/null @@ -1,166 +0,0 @@ -set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") - -function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) - string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) - if(BUILDTREES_PATH_LENGTH GREATER 37 AND CMAKE_HOST_WIN32) - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) - endif() - - set(MAJOR_MINOR 5.12) - set(FULL_VERSION ${MAJOR_MINOR}.3) - set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") - - vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/${MAJOR_MINOR}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" - FILENAME ${ARCHIVE_NAME} - SHA512 ${HASH} - ) - vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE "${ARCHIVE_FILE}" - REF ${FULL_VERSION} - ) - - set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) -endfunction() - -function(qt_modular_build_library SOURCE_PATH) - # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings - set(ENV{_CL_} "/utf-8") - - #Store build paths - set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - - #Find Python and add it to the path - vcpkg_find_acquire_program(PYTHON2) - get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) - vcpkg_add_to_path("${PYTHON2_EXE_PATH}") - - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - - if(WIN32) - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) - else() - set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) - set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) - endif() - - #Configure debug+release - vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) - #Build debug+release - if (CMAKE_HOST_WIN32) - vcpkg_build_qmake() - else() - vcpkg_build_qmake(SKIP_MAKEFILES) - endif() - - #Fix the cmake files if they exist - if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py ${PORT} - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) - endif() - - file(GLOB_RECURSE MAKEFILES ${DEBUG_DIR}/*Makefile* ${RELEASE_DIR}/*Makefile*) - - foreach(MAKEFILE ${MAKEFILES}) - file(READ "${MAKEFILE}" _contents) - #Set the correct install directory to packages - string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") - file(WRITE "${MAKEFILE}" "${_contents}") - endforeach() - - #Install the module files - vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) - - #Install cmake files - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) - endif() - #Remove extra cmake files - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - endif() - - file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) - endif() - foreach(PRL_FILE IN LISTS PRL_FILES) - file(READ "${PRL_FILE}" _contents) - string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") - file(WRITE "${PRL_FILE}" "${_contents}") - endforeach() - - file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() - file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*") - if(NOT DEBUG_FILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() - - #Move release and debug dlls to the correct directory - if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5) - file(RENAME ${CURRENT_PACKAGES_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) - endif() - - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll) - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll) - if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() - endif() - if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - endif() - - #Find the relevant license file and install it - if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") - endif() - file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -endfunction() - -function(qt_modular_library NAME HASH) - qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH) - qt_modular_build_library(${TARGET_SOURCE_PATH}) -endfunction() diff --git a/ports/qt5-mqtt/CONTROL b/ports/qt5-mqtt/CONTROL index 0e424dad9e2..d102ec611a2 100644 --- a/ports/qt5-mqtt/CONTROL +++ b/ports/qt5-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: qt5-mqtt -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 MQTT module. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-mqtt/portfile.cmake b/ports/qt5-mqtt/portfile.cmake index 7ccdf913fb2..069860e21dc 100644 --- a/ports/qt5-mqtt/portfile.cmake +++ b/ports/qt5-mqtt/portfile.cmake @@ -1,21 +1,20 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +#qt_submodule_installation() No binary package for this port. vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO qt/qtmqtt - REF cf41d84738f0ed0c779f75db94d413ad938fb901 - SHA512 e9a818999e4befb0b945d609a1ee28a3e2d7e3b6d8c12ab82ae827fdb8f6bf5e8b82114c1850438d634fa24c9ac608ebae1d461385bd4e088f8cabf7eec0182c - HEAD_REF dev + REF v${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER} + SHA512 ${QT_HASH_${PORT}} ) -# Qt module builds from a git repository require a .git entry to invoke syncqt +# qt module builds from a git repository require a .git entry to invoke syncqt file(WRITE "${SOURCE_PATH}/.git" "repocontent") -# syncqt is a PERL script +# syncqt is a perl script vcpkg_find_acquire_program(PERL) -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -vcpkg_add_to_path("${PERL_EXE_PATH}") +get_filename_component(perl_exe_path ${PERL} DIRECTORY) +vcpkg_add_to_path("${perl_exe_path}") -qt_modular_build_library(${SOURCE_PATH}) +qt_build_submodule(${SOURCE_PATH}) +qt_install_copyright(${SOURCE_PATH}) diff --git a/ports/qt5-multimedia/CONTROL b/ports/qt5-multimedia/CONTROL index 9e41198a68f..d72c77782d5 100644 --- a/ports/qt5-multimedia/CONTROL +++ b/ports/qt5-multimedia/CONTROL @@ -1,4 +1,4 @@ Source: qt5-multimedia -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-multimedia/portfile.cmake b/ports/qt5-multimedia/portfile.cmake index d6292a1bad4..214726759f3 100644 --- a/ports/qt5-multimedia/portfile.cmake +++ b/ports/qt5-multimedia/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtmultimedia 4f10e40aaf73dda2d70502e6a1441149c2b4389e9c7de72245c850d926c3ecb57ca6b09c63d208eff4b9ec63b7f9845eb2740cd0df4e4b7eee8f51746a6d3963) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-networkauth/CONTROL b/ports/qt5-networkauth/CONTROL index 34f5d82a2a5..0fdce68e9f2 100644 --- a/ports/qt5-networkauth/CONTROL +++ b/ports/qt5-networkauth/CONTROL @@ -1,4 +1,4 @@ Source: qt5-networkauth -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Network Authorization Module -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-networkauth/portfile.cmake b/ports/qt5-networkauth/portfile.cmake index ef4e63989d8..214726759f3 100644 --- a/ports/qt5-networkauth/portfile.cmake +++ b/ports/qt5-networkauth/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtnetworkauth 07bf159360fe126c23387c6ed5b955218771ac37848ddb83542733c786b415f9aa5c22fd4a965fff591869d2d819bba420b69718e487df3cce382f411f493142) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-purchasing/CONTROL b/ports/qt5-purchasing/CONTROL index bd859657188..e4ab3eb2693 100644 --- a/ports/qt5-purchasing/CONTROL +++ b/ports/qt5-purchasing/CONTROL @@ -1,4 +1,4 @@ Source: qt5-purchasing -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-purchasing/portfile.cmake b/ports/qt5-purchasing/portfile.cmake index c172817df28..2cd1cf47965 100644 --- a/ports/qt5-purchasing/portfile.cmake +++ b/ports/qt5-purchasing/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtpurchasing 3069ece2083d0661a3599c631cf0832a80e01262b5858ffd407bc0d80e35711f2f973b2c085b6dd5539f3ec26004c684df99d477e58ab62da63d705a8a5616c9) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL index b7360350d9d..dd4fa1b1d6e 100644 --- a/ports/qt5-quickcontrols/CONTROL +++ b/ports/qt5-quickcontrols/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 QuickControls Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols/portfile.cmake b/ports/qt5-quickcontrols/portfile.cmake index bb4aa8a6615..d473c56257a 100644 --- a/ports/qt5-quickcontrols/portfile.cmake +++ b/ports/qt5-quickcontrols/portfile.cmake @@ -1,7 +1,3 @@ -SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtquickcontrols 23410fb82088591a8bed7e8e4127d13929a03adc0dfd18f7e2f906acdac21f7dcbb15cb2257272b893d937bbb54860992667c11aa0c6157d4a3b871616c4641c) +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL index 88358dd1613..48e60fe1c8b 100644 --- a/ports/qt5-quickcontrols2/CONTROL +++ b/ports/qt5-quickcontrols2/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols2 -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 QuickControls2 Module. -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/portfile.cmake b/ports/qt5-quickcontrols2/portfile.cmake index 6b65b022f80..214726759f3 100644 --- a/ports/qt5-quickcontrols2/portfile.cmake +++ b/ports/qt5-quickcontrols2/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtquickcontrols2 afc1ae9a5a046845b085d5cf0019b79d99914a2d285676bd4d8966f1302513078c8279b71134281c03b2c1209295bca438b9e255774574520498b0b5385bad27) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-remoteobjects/CONTROL b/ports/qt5-remoteobjects/CONTROL index ffe6095a542..2cbe0665c7b 100644 --- a/ports/qt5-remoteobjects/CONTROL +++ b/ports/qt5-remoteobjects/CONTROL @@ -1,4 +1,4 @@ Source: qt5-remoteobjects -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Remoteobjects module - Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-remoteobjects/portfile.cmake b/ports/qt5-remoteobjects/portfile.cmake index 8d2d45a6e7b..2cd1cf47965 100644 --- a/ports/qt5-remoteobjects/portfile.cmake +++ b/ports/qt5-remoteobjects/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtremoteobjects f01b9497dab7e5db24f090d227fca5703a50b5065ad6c0798b78e83b41c374a04eb2857ffaf0225071791c9bb6b8703e37e47d31bf905fa819395b4d69819178) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-script/CONTROL b/ports/qt5-script/CONTROL index 4fe0bb02801..65be28f533c 100755 --- a/ports/qt5-script/CONTROL +++ b/ports/qt5-script/CONTROL @@ -1,4 +1,4 @@ Source: qt5-script -Version: 5.12.3-1 -Build-Depends: qt5-base, qt5-modularscripts +Version: 5.12.4 +Build-Depends: qt5-base Description:Qt5 Script Module. diff --git a/ports/qt5-script/portfile.cmake b/ports/qt5-script/portfile.cmake index 0d2a8418d51..2cd1cf47965 100755 --- a/ports/qt5-script/portfile.cmake +++ b/ports/qt5-script/portfile.cmake @@ -1,5 +1,2 @@ - -include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtscript 4c4498acb39536bdc03643fb1717c7a47c82b1734cf67d17d40bc216084f01e837648d261f7f69e317387f9c6efa9aaa6b0df8f5532f55615252c95b1089ca1a) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-scxml/CONTROL b/ports/qt5-scxml/CONTROL index accc5100aa6..d50f9c1d276 100644 --- a/ports/qt5-scxml/CONTROL +++ b/ports/qt5-scxml/CONTROL @@ -1,4 +1,4 @@ Source: qt5-scxml -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-scxml/portfile.cmake b/ports/qt5-scxml/portfile.cmake index 860e25246c1..214726759f3 100644 --- a/ports/qt5-scxml/portfile.cmake +++ b/ports/qt5-scxml/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtscxml d515506d90ace5eedfe8bf3439dad0853dbbdbd36dfb509dfa13e3358838353de66d5f6245afe4eeebd19dd3f0ab0ce5e4c3e6fe5d40e5ab46763c453a562a49) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-sensors/CONTROL b/ports/qt5-sensors/CONTROL index a69df5531b0..8baf0d3963f 100644 --- a/ports/qt5-sensors/CONTROL +++ b/ports/qt5-sensors/CONTROL @@ -1,4 +1,4 @@ Source: qt5-sensors -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Sensors module - Provides access to sensor hardware and motion gesture recognition. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-sensors/portfile.cmake b/ports/qt5-sensors/portfile.cmake index 3af79811730..2cd1cf47965 100644 --- a/ports/qt5-sensors/portfile.cmake +++ b/ports/qt5-sensors/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtsensors cf0c8c58bbb84debd6b464bd9b91af7e79a301031613b8a2d0715fa276573dafea0a1c8e472fa2a2d4debd9b26f86a5e6efa9a8d57f7ab9102b1314d609579e5) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-serialport/CONTROL b/ports/qt5-serialport/CONTROL index e9613f2351d..5964e654f62 100644 --- a/ports/qt5-serialport/CONTROL +++ b/ports/qt5-serialport/CONTROL @@ -1,4 +1,4 @@ Source: qt5-serialport -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Serial Port - provides access to hardware and virtual serial ports -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-serialport/portfile.cmake b/ports/qt5-serialport/portfile.cmake index 0c2a0f116c4..214726759f3 100644 --- a/ports/qt5-serialport/portfile.cmake +++ b/ports/qt5-serialport/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtserialport 42551b74abe1fcaa1972fb1134215987d7c1d0fe73874a4c6ad5b9aadad71a2066a1846c297569bb1562f94e54a406e8074d444deca510a566e27cd386b47ecf) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-speech/CONTROL b/ports/qt5-speech/CONTROL index ee1606cbd56..be313575790 100644 --- a/ports/qt5-speech/CONTROL +++ b/ports/qt5-speech/CONTROL @@ -1,4 +1,4 @@ Source: qt5-speech -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Speech Module -Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) +Build-Depends: qt5-base, atlmfc (windows) diff --git a/ports/qt5-speech/portfile.cmake b/ports/qt5-speech/portfile.cmake index f4402508daf..214726759f3 100644 --- a/ports/qt5-speech/portfile.cmake +++ b/ports/qt5-speech/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtspeech 9623a83cdfbed07dffcd8f0808c2a514c97fda72b68827d917f1a8ee3072286ef8bce06b114db94d7a0c3fc79425c2540fa5cadc6551367fd4431e5396395932) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-svg/CONTROL b/ports/qt5-svg/CONTROL index 8f7f9573741..15acc93d99f 100644 --- a/ports/qt5-svg/CONTROL +++ b/ports/qt5-svg/CONTROL @@ -1,4 +1,4 @@ Source: qt5-svg -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-svg/portfile.cmake b/ports/qt5-svg/portfile.cmake index a8379b13105..214726759f3 100644 --- a/ports/qt5-svg/portfile.cmake +++ b/ports/qt5-svg/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtsvg 23517dbdc30d7128fcbeb12a301eeeb300424bb17bc0d156d5e9298c092d3d3afd2cba45768f2512e58977ee2408450f50c385e03a47ccaf3ff6bc7e4fddf61a) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL index c64f3536c69..c8699b5e1bb 100644 --- a/ports/qt5-tools/CONTROL +++ b/ports/qt5-tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5-tools -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications -Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index a563767da8c..214726759f3 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -1,7 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qttools d37c0e11a26a21aa60f29f3b17ddc9895385d848692956e4481e49003cbe9c227daf8fda1c40a2ab70ac8e7e56d3771c1b2964524589eb77ac1f2362c269162e) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-tools/plugins/platforminputcontexts) \ No newline at end of file +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-virtualkeyboard/CONTROL b/ports/qt5-virtualkeyboard/CONTROL index de343f92862..4d9460837f5 100644 --- a/ports/qt5-virtualkeyboard/CONTROL +++ b/ports/qt5-virtualkeyboard/CONTROL @@ -1,4 +1,4 @@ Source: qt5-virtualkeyboard -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-svg, qt5-quickcontrols diff --git a/ports/qt5-virtualkeyboard/portfile.cmake b/ports/qt5-virtualkeyboard/portfile.cmake index 4d8310f7a1a..214726759f3 100644 --- a/ports/qt5-virtualkeyboard/portfile.cmake +++ b/ports/qt5-virtualkeyboard/portfile.cmake @@ -1,7 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtvirtualkeyboard 1aa00fec7e333e4fd52891b82c239b532cf41657d9c3f44c6cc1c211a1412dbf5584823511e54f3feb33b3fed9c6e0171b55afde2df9f0a358e2e4885e1b2686) - -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-webchannel/CONTROL b/ports/qt5-webchannel/CONTROL index 93b47e0e036..8934f47c7f1 100644 --- a/ports/qt5-webchannel/CONTROL +++ b/ports/qt5-webchannel/CONTROL @@ -1,4 +1,4 @@ Source: qt5-webchannel -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Web Channel module - Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-webchannel/portfile.cmake b/ports/qt5-webchannel/portfile.cmake index a453326c5f1..2cd1cf47965 100644 --- a/ports/qt5-webchannel/portfile.cmake +++ b/ports/qt5-webchannel/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebchannel 2dda4351f5f3a5895a955d0ee77e55f758233672005a068d3e840a01d379727f99287fc6c8fb96516f23a5a8c4ebcb61098690fd3351e79be608e28657534006) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-websockets/CONTROL b/ports/qt5-websockets/CONTROL index 4fbf6c19a19..4369cdaa02d 100644 --- a/ports/qt5-websockets/CONTROL +++ b/ports/qt5-websockets/CONTROL @@ -1,4 +1,4 @@ Source: qt5-websockets -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-websockets/portfile.cmake b/ports/qt5-websockets/portfile.cmake index 88cc1fd9ab9..214726759f3 100644 --- a/ports/qt5-websockets/portfile.cmake +++ b/ports/qt5-websockets/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebsockets 212a98d987b4fd16216ac9a1c98e061be6a5bd2e2c4ec8be80424d6f23afeace790fe666abe8a11e2116dc20f17a41ad0c817fceacdfa5f766b93068ac614817) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-webview/CONTROL b/ports/qt5-webview/CONTROL index b82afd8ef2d..7ede26f52c1 100644 --- a/ports/qt5-webview/CONTROL +++ b/ports/qt5-webview/CONTROL @@ -1,4 +1,4 @@ Source: qt5-webview -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 WebView module - Provides a way to display web content in a QML application without necessarily including a full web browser stack by using native APIs where it makes sense. -Build-Depends: qt5-base, qt5-modularscripts, qt5-declarative +Build-Depends: qt5-base, qt5-declarative diff --git a/ports/qt5-webview/portfile.cmake b/ports/qt5-webview/portfile.cmake index 813c5601bd0..2cd1cf47965 100644 --- a/ports/qt5-webview/portfile.cmake +++ b/ports/qt5-webview/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebview 426227b9b4cb61c0e88958dbaab21e842a25989098a0e94a06fe3efc8a2b9d4a5d3216296c8228da977ef52cd5844b66048bcb84019da4f06de1b1009dfdffa5) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL index cbb4a71c657..2df6a422f66 100644 --- a/ports/qt5-winextras/CONTROL +++ b/ports/qt5-winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5-winextras -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. -Build-Depends: qt5-modularscripts, qt5-base, atlmfc (windows) +Build-Depends: qt5-base, atlmfc (windows) diff --git a/ports/qt5-winextras/portfile.cmake b/ports/qt5-winextras/portfile.cmake index 90adb16c09b..54153bed711 100644 --- a/ports/qt5-winextras/portfile.cmake +++ b/ports/qt5-winextras/portfile.cmake @@ -1,9 +1,5 @@ -include(vcpkg_common_functions) - if (NOT VCPKG_TARGET_IS_WINDOWS) message(FATAL_ERROR "qt5-winextras only support Windows.") endif() - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwinextras e50cb237359ce7a3bde6989ec4349fe67be3b4999092516e891bba12f0fb4acb9954de8e2f0171db0e849b7d3ef94bd80f77f81162afb239e49c6e2e0760343b) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5-xmlpatterns/CONTROL b/ports/qt5-xmlpatterns/CONTROL index a2e394f3d68..cc8267c0671 100644 --- a/ports/qt5-xmlpatterns/CONTROL +++ b/ports/qt5-xmlpatterns/CONTROL @@ -1,4 +1,4 @@ Source: qt5-xmlpatterns -Version: 5.12.3-1 +Version: 5.12.4 Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-base diff --git a/ports/qt5-xmlpatterns/portfile.cmake b/ports/qt5-xmlpatterns/portfile.cmake index c92a6057b5d..214726759f3 100644 --- a/ports/qt5-xmlpatterns/portfile.cmake +++ b/ports/qt5-xmlpatterns/portfile.cmake @@ -1,5 +1,2 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtxmlpatterns 4e421f0c78ca74f726f758bd95b33915297922f3b5a4fff84dde2600969f54f3914828fdb7903c7171e192f81966680b6c6bb4750de0be72728124470e7c798d) \ No newline at end of file +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 03fcaa8b06a..3c5cd8b6d10 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,5 +1,6 @@ Source: qt5 -Version: 5.12.3-1 +Version: 5.12.4 Homepage: https://www.qt.io/ Description: Qt5 Application Framework Build-Depends: qt5-3d, qt5-activeqt (windows), qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-location, qt5-multimedia, qt5-mqtt, qt5-networkauth, qt5-purchasing, qt5-quickcontrols, qt5-quickcontrols2, qt5-script, qt5-scxml, qt5-sensors, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-webchannel, qt5-websockets, qt5-winextras (windows), qt5-macextras (osx), qt5-xmlpatterns + diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index cf79fe8fcaa..03c468463bb 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -11,11 +11,9 @@ function(vcpkg_build_qmake) cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN}) if(CMAKE_HOST_WIN32) - set(_PATHSEP ";") vcpkg_find_acquire_program(JOM) set(INVOKE "${JOM}") else() - set(_PATHSEP ":") find_program(MAKE make) set(INVOKE "${MAKE}") endif() @@ -23,22 +21,8 @@ function(vcpkg_build_qmake) # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(DEBUG_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(RELEASE_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - endif() - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - list(APPEND _csc_RELEASE_TARGETS ${_csc_TARGETS}) - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - list(APPEND _csc_DEBUG_TARGETS ${_csc_TARGETS}) - endif() - if(NOT _csc_BUILD_LOGNAME) set(_csc_BUILD_LOGNAME build) endif() @@ -56,55 +40,33 @@ function(vcpkg_build_qmake) set(ENV_CL_BACKUP "$ENV{_CL_}") set(ENV{_CL_} "/utf-8") - #First generate the makefiles so we can modify them + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib${_PATHSEP}${CURRENT_INSTALLED_DIR}/debug/bin${_PATHSEP}${CURRENT_INSTALLED_DIR}/tools/qt5${_PATHSEP}${ENV_PATH_BACKUP}") - if(NOT _csc_SKIP_MAKEFILES) - run_jom(qmake_all makefiles dbg) - - #Store debug makefiles path - file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - - foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib shell32.lib" _contents "${_contents}") - string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") - string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") - string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") - endforeach() - endif() - - run_jom("${_csc_DEBUG_TARGETS}" ${_csc_BUILD_LOGNAME} dbg) + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib${_PATHSEP}${CURRENT_INSTALLED_DIR}/bin${_PATHSEP}${CURRENT_INSTALLED_DIR}/tools/qt5${_PATHSEP}${ENV_PATH_BACKUP}") - if(NOT _csc_SKIP_MAKEFILES) - run_jom(qmake_all makefiles rel) - - #Store release makefile path - file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - - foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib shell32.lib" _contents "${_contents}") - string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}") - string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}") - string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}") - string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") - endforeach() - endif() - - run_jom("${_csc_RELEASE_TARGETS}" ${_csc_BUILD_LOGNAME} rel) + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") endif() + unset(_buildname) + foreach(_buildname ${BUILDTYPES}) + set(_BUILD_PREFIX "${_path_suffix_${_buildname}}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_BUILD_PREFIX}/bin") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_BUILD_PREFIX}/lib") + list(APPEND _csc_${_buildname}_TARGETS ${_csc_TARGETS}) + if(NOT _csc_SKIP_MAKEFILES) + run_jom(qmake_all makefiles ${_short_name_${_buildname}}) + endif() + run_jom("${_csc_${_buildname}_TARGETS}" ${_csc_BUILD_LOGNAME} ${_short_name_${_buildname}}) + endforeach() + # Restore the original value of ENV{PATH} set(ENV{PATH} "${ENV_PATH_BACKUP}") set(ENV{_CL_} "${ENV_CL_BACKUP}") diff --git a/scripts/cmake/vcpkg_buildpath_length_warning.cmake b/scripts/cmake/vcpkg_buildpath_length_warning.cmake new file mode 100644 index 00000000000..b7ef10bb88f --- /dev/null +++ b/scripts/cmake/vcpkg_buildpath_length_warning.cmake @@ -0,0 +1,8 @@ +function(vcpkg_buildpath_length_warning WARNING_LENGTH) + string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) + if(BUILDTREES_PATH_LENGTH GREATER ${WARNING_LENGTH} AND CMAKE_HOST_WIN32) + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) + endif() +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 5f4155e9db1..d2ea3560816 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -35,3 +35,4 @@ include(vcpkg_replace_string) include(vcpkg_from_git) include(vcpkg_test_cmake) include(vcpkg_prettify_command) +include(vcpkg_buildpath_length_warning) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index d660fedd700..73f554a3399 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -6,37 +6,53 @@ # :: # vcpkg_configure_qmake(SOURCE_PATH # [OPTIONS arg1 [arg2 ...]] +# [OPTIONS_RELEASE arg1 [arg2 ...]] +# [OPTIONS_DEBUG arg1 [arg2 ...]] # ) # # ``SOURCE_PATH`` # The path to the *.pro qmake project file. -# ``OPTIONS`` +# ``OPTIONS[_RELEASE|_DEBUG]`` # The options passed to qmake. function(vcpkg_configure_qmake) - cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) - + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) + # Find qmake executable - find_program(QMAKE_COMMAND NAMES qmake PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + set(_triplet_hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin) + find_program(QMAKE_COMMAND NAMES qmake PATHS ${VCPKG_QT_HOST_TOOLS_ROOT_DIR}/bin ${_triplet_hostbindir}) if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS CONFIG+=staticlib) + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + list(APPEND _csc_OPTIONS "CONFIG-=shared") + list(APPEND _csc_OPTIONS "CONFIG*=static") + else() + list(APPEND _csc_OPTIONS "CONFIG-=static") + list(APPEND _csc_OPTIONS "CONFIG*=shared") + list(APPEND _csc_OPTIONS_DEBUG "CONFIG*=separate_debug_info") endif() - + + if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_CRT_LINKAGE} STREQUAL "static") + list(APPEND _csc_OPTIONS "CONFIG*=static-runtime") + endif() + # Cleanup build directories file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) @@ -49,7 +65,7 @@ function(vcpkg_configure_qmake) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg )