From 2a94ee4c62ad8b3468ae10fa5c0f02dc92e0c1be Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 15 Oct 2017 22:22:17 +1100 Subject: [PATCH 1/8] qt5 base --- ports/qt5base/CONTROL | 4 + ports/qt5base/configure_qt.cmake | 63 ++++++++++++++++ ports/qt5base/fix-system-pcre2.patch | 18 +++++ ports/qt5base/fixcmake.py | 48 ++++++++++++ ports/qt5base/install_qt.cmake | 45 +++++++++++ ports/qt5base/portfile.cmake | 109 +++++++++++++++++++++++++++ 6 files changed, 287 insertions(+) create mode 100644 ports/qt5base/CONTROL create mode 100644 ports/qt5base/configure_qt.cmake create mode 100644 ports/qt5base/fix-system-pcre2.patch create mode 100644 ports/qt5base/fixcmake.py create mode 100644 ports/qt5base/install_qt.cmake create mode 100644 ports/qt5base/portfile.cmake diff --git a/ports/qt5base/CONTROL b/ports/qt5base/CONTROL new file mode 100644 index 0000000000..0b9e4792a8 --- /dev/null +++ b/ports/qt5base/CONTROL @@ -0,0 +1,4 @@ +Source: qt5base +Version: 5.9.2-0 +Description: Qt5 application framework base components. Webengine, examples and tests not included. +Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake new file mode 100644 index 0000000000..fea8de923b --- /dev/null +++ b/ports/qt5base/configure_qt.cmake @@ -0,0 +1,63 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if (_csc_PLATFORM) + set(PLATFORM ${_csc_PLATFORM}) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + set(PLATFORM "win32-msvc2015") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(PLATFORM "win32-msvc2017") + 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) + set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") + + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS + "-static" + "-static-runtime" + ) + endif() + + 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_PACKAGES_DIR}/debug + -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/debug/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + + 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_PACKAGES_DIR} + -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -plugindir ${CURRENT_PACKAGES_DIR}/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/qml + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +endfunction() \ No newline at end of file diff --git a/ports/qt5base/fix-system-pcre2.patch b/ports/qt5base/fix-system-pcre2.patch new file mode 100644 index 0000000000..be401d448e --- /dev/null +++ b/ports/qt5base/fix-system-pcre2.patch @@ -0,0 +1,18 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index a5b69a2..01c5cde 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -159,7 +159,12 @@ + ] + }, + "sources": [ +- "-lpcre2-16" ++ { ++ "builds": { ++ "debug": "-lpcre2-16d", ++ "release": "-lpcre2-16" ++ } ++ } + ] + }, + "pps": { diff --git a/ports/qt5base/fixcmake.py b/ports/qt5base/fixcmake.py new file mode 100644 index 0000000000..d55ca77546 --- /dev/null +++ b/ports/qt5base/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +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") + for line in openedfile: + if "_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 exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake new file mode 100644 index 0000000000..1b0bec9353 --- /dev/null +++ b/ports/qt5base/install_qt.cmake @@ -0,0 +1,45 @@ +function(install_qt) + cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) + + if (_bc_DISABLE_PARALLEL) + set(JOBS "1") + else() + set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") + endif() + + vcpkg_find_acquire_program(JOM) + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + + set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + set(_path "$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + set(ENV{PATH} "${_path}") + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") +endfunction() \ No newline at end of file diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake new file mode 100644 index 0000000000..9e2efeac77 --- /dev/null +++ b/ports/qt5base/portfile.cmake @@ -0,0 +1,109 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +include(configure_qt) +include(install_qt) + +set(SRCDIR_NAME "qt-5.9.2") +set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" +) + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +configure_qt( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -confirm-license + -opensource + -system-zlib + -system-libjpeg + -system-libpng + -system-freetype + -system-pcre + -system-harfbuzz + -system-doubleconversion + -system-sqlite + -sql-sqlite + -sql-psql + -feature-freetype + -nomake examples -nomake tests + -opengl desktop # other options are "-no-opengl" and "-opengl angle" + -mp + LIBJPEG_LIBS="-ljpeg" + OPTIONS_RELEASE + ZLIB_LIBS="-lzlib" + LIBPNG_LIBS="-llibpng16" + OPTIONS_DEBUG + ZLIB_LIBS="-lzlibd" + LIBPNG_LIBS="-llibpng16d" + PSQL_LIBS="-llibpqd" + FREETYPE_LIBS="-lfreetyped" +) + +install_qt() + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(REMOVE ${BINARY_TOOLS}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +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}) + +#--------------------------------------------------------------------------- +# Qt5Bootstrap: a release-only dependency +#--------------------------------------------------------------------------- +# Remove release-only Qt5Bootstrap.lib from debug folders: +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +# Above approach does not work: +# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) +# requires the two sets to be of equal size! +# Alt. approach, create dummy folder instead: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +#--------------------------------------------------------------------------- + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) \ No newline at end of file From 459ac9f2e17340e10e3cb8a66f956c59541d5fdd Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 00:40:25 +1100 Subject: [PATCH 2/8] qt5tools package --- ports/qt5base/portfile.cmake | 2 +- ports/qt5tools/CONTROL | 4 +++ ports/qt5tools/portfile.cmake | 51 +++++++++++++++++++++++++++ scripts/cmake/vcpkg_build_qmake.cmake | 11 +++--- 4 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 ports/qt5tools/CONTROL create mode 100644 ports/qt5tools/portfile.cmake diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 9e2efeac77..359c81990b 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -15,7 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) -set(SRCDIR_NAME "qt-5.9.2") +set(SRCDIR_NAME "qtbase-5.9.2") set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") set(ARCHIVE_EXTENSION ".tar.xz") diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL new file mode 100644 index 0000000000..7bdb5c1dba --- /dev/null +++ b/ports/qt5tools/CONTROL @@ -0,0 +1,4 @@ +Source: qt5tools +Version: 5.9.2-0 +Description: Qt5 tools +Build-Depends: qt5base diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake new file mode 100644 index 0000000000..6d01d63330 --- /dev/null +++ b/ports/qt5tools/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qttools-5.9.2") +set(ARCHIVE_NAME "qttools-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +#Clean up build directories +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + +vcpkg_configure_qmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + OPTIONS "CONFIG+=release" +) + +vcpkg_build_qmake() + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) + +#touch an empty include file - qt tools does not create any and this is an error in vcpkg +file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 1c63586547..bee5da7c9e 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -15,18 +15,17 @@ function(vcpkg_build_qmake) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used - set(ENV_LIB_BACKUP ENV{LIB}) - set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;$ENV{LIB}") + set(ENV_PATH_BACKUP ENV{PATH}) + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}") - vcpkg_execute_required_process_repeat( - COUNT 2 + vcpkg_execute_required_process( COMMAND ${JOM} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} LOGNAME package-${TARGET_TRIPLET} ) message(STATUS "Package ${TARGET_TRIPLET} done") - # Restore the original value of ENV{LIB} - set(ENV{LIB} ENV_LIB_BACKUP) + # Restore the original value of ENV{PATH} + set(ENV{PATH} ENV_PATH_BACKUP) endfunction() From 890a81bebc3642454e3833c789a35ba9a7989c9d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 00:41:48 +1100 Subject: [PATCH 3/8] remove old qt5 --- ports/qt5/CONTROL | 4 - ports/qt5/add-private-header-paths.patch | 801 ---------------------- ports/qt5/configure_qt.cmake | 62 -- ports/qt5/fix-commandline-overrides.patch | 149 ---- ports/qt5/fix-qalgorithms-vs2017.patch | 138 ---- ports/qt5/fixcmake.py | 63 -- ports/qt5/install_qt.cmake | 45 -- ports/qt5/portfile.cmake | 147 ---- ports/qt5/qtdeploy.ps1 | 68 -- 9 files changed, 1477 deletions(-) delete mode 100644 ports/qt5/CONTROL delete mode 100644 ports/qt5/add-private-header-paths.patch delete mode 100644 ports/qt5/configure_qt.cmake delete mode 100644 ports/qt5/fix-commandline-overrides.patch delete mode 100644 ports/qt5/fix-qalgorithms-vs2017.patch delete mode 100644 ports/qt5/fixcmake.py delete mode 100644 ports/qt5/install_qt.cmake delete mode 100644 ports/qt5/portfile.cmake delete mode 100644 ports/qt5/qtdeploy.ps1 diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL deleted file mode 100644 index ce46d249b7..0000000000 --- a/ports/qt5/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5 -Version: 5.8-6 -Description: Qt5 application framework main components. Webengine, examples and tests not included. -Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion diff --git a/ports/qt5/add-private-header-paths.patch b/ports/qt5/add-private-header-paths.patch deleted file mode 100644 index c6e233710d..0000000000 --- a/ports/qt5/add-private-header-paths.patch +++ /dev/null @@ -1,801 +0,0 @@ -diff --git a/Qt53DCore/Qt53DCoreConfig.cmake b/Qt53DCore/Qt53DCoreConfig.cmake -index 80fc091..4fbaf5e 100644 ---- a/Qt53DCore/Qt53DCoreConfig.cmake -+++ b/Qt53DCore/Qt53DCoreConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DCore) - - set(_Qt53DCore_OWN_INCLUDE_DIRS "${_qt53DCore_install_prefix}/include/" "${_qt53DCore_install_prefix}/include/Qt3DCore") -- set(Qt53DCore_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DCore_PRIVATE_INCLUDE_DIRS -+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0" -+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0/Qt3DCore" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DCore_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DExtras/Qt53DExtrasConfig.cmake b/Qt53DExtras/Qt53DExtrasConfig.cmake -index 61de455..5f00da8 100644 ---- a/Qt53DExtras/Qt53DExtrasConfig.cmake -+++ b/Qt53DExtras/Qt53DExtrasConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DExtras) - - set(_Qt53DExtras_OWN_INCLUDE_DIRS "${_qt53DExtras_install_prefix}/include/" "${_qt53DExtras_install_prefix}/include/Qt3DExtras") -- set(Qt53DExtras_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DExtras_PRIVATE_INCLUDE_DIRS -+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0" -+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0/Qt3DExtras" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DExtras_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DInput/Qt53DInputConfig.cmake b/Qt53DInput/Qt53DInputConfig.cmake -index 1526967..089441e 100644 ---- a/Qt53DInput/Qt53DInputConfig.cmake -+++ b/Qt53DInput/Qt53DInputConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DInput) - - set(_Qt53DInput_OWN_INCLUDE_DIRS "${_qt53DInput_install_prefix}/include/" "${_qt53DInput_install_prefix}/include/Qt3DInput") -- set(Qt53DInput_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DInput_PRIVATE_INCLUDE_DIRS -+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0" -+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0/Qt3DInput" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DInput_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DLogic/Qt53DLogicConfig.cmake b/Qt53DLogic/Qt53DLogicConfig.cmake -index 336f0dc..963be42 100644 ---- a/Qt53DLogic/Qt53DLogicConfig.cmake -+++ b/Qt53DLogic/Qt53DLogicConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DLogic) - - set(_Qt53DLogic_OWN_INCLUDE_DIRS "${_qt53DLogic_install_prefix}/include/" "${_qt53DLogic_install_prefix}/include/Qt3DLogic") -- set(Qt53DLogic_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DLogic_PRIVATE_INCLUDE_DIRS -+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0" -+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0/Qt3DLogic" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DLogic_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuick/Qt53DQuickConfig.cmake b/Qt53DQuick/Qt53DQuickConfig.cmake -index cf510c9..0277c0c 100644 ---- a/Qt53DQuick/Qt53DQuickConfig.cmake -+++ b/Qt53DQuick/Qt53DQuickConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuick) - - set(_Qt53DQuick_OWN_INCLUDE_DIRS "${_qt53DQuick_install_prefix}/include/" "${_qt53DQuick_install_prefix}/include/Qt3DQuick") -- set(Qt53DQuick_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuick_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0" -+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0/Qt3DQuick" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuick_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -index 06fe217..f935824 100644 ---- a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -+++ b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuickInput) - - set(_Qt53DQuickInput_OWN_INCLUDE_DIRS "${_qt53DQuickInput_install_prefix}/include/" "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput") -- set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0" -+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0/Qt3DQuickInput" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuickInput_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -index dd5472b..ef728fd 100644 ---- a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -+++ b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuickRender) - - set(_Qt53DQuickRender_OWN_INCLUDE_DIRS "${_qt53DQuickRender_install_prefix}/include/" "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender") -- set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0" -+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0/Qt3DQuickRender" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuickRender_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DRender/Qt53DRenderConfig.cmake b/Qt53DRender/Qt53DRenderConfig.cmake -index 70eff4b..271463b 100644 ---- a/Qt53DRender/Qt53DRenderConfig.cmake -+++ b/Qt53DRender/Qt53DRenderConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DRender) - - set(_Qt53DRender_OWN_INCLUDE_DIRS "${_qt53DRender_install_prefix}/include/" "${_qt53DRender_install_prefix}/include/Qt3DRender") -- set(Qt53DRender_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DRender_PRIVATE_INCLUDE_DIRS -+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0" -+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0/Qt3DRender" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DRender_OWN_INCLUDE_DIRS}) -diff --git a/Qt5AxBase/Qt5AxBaseConfig.cmake b/Qt5AxBase/Qt5AxBaseConfig.cmake -index 48966d5..63afee8 100644 ---- a/Qt5AxBase/Qt5AxBaseConfig.cmake -+++ b/Qt5AxBase/Qt5AxBaseConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::AxBase) - - set(_Qt5AxBase_OWN_INCLUDE_DIRS "${_qt5AxBase_install_prefix}/include/" "${_qt5AxBase_install_prefix}/include/ActiveQt") -- set(Qt5AxBase_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5AxBase_PRIVATE_INCLUDE_DIRS -+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0" -+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0/ActiveQt" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5AxBase_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Bluetooth/Qt5BluetoothConfig.cmake b/Qt5Bluetooth/Qt5BluetoothConfig.cmake -index 9d2f7c4..1223caf 100644 ---- a/Qt5Bluetooth/Qt5BluetoothConfig.cmake -+++ b/Qt5Bluetooth/Qt5BluetoothConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Bluetooth) - - set(_Qt5Bluetooth_OWN_INCLUDE_DIRS "${_qt5Bluetooth_install_prefix}/include/" "${_qt5Bluetooth_install_prefix}/include/QtBluetooth") -- set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS -+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0" -+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0/QtBluetooth" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Bluetooth_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Charts/Qt5ChartsConfig.cmake b/Qt5Charts/Qt5ChartsConfig.cmake -index fef4b13..52e458d 100644 ---- a/Qt5Charts/Qt5ChartsConfig.cmake -+++ b/Qt5Charts/Qt5ChartsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Charts) - - set(_Qt5Charts_OWN_INCLUDE_DIRS "${_qt5Charts_install_prefix}/include/" "${_qt5Charts_install_prefix}/include/QtCharts") -- set(Qt5Charts_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Charts_PRIVATE_INCLUDE_DIRS -+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0" -+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0/QtCharts" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Charts_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Core/Qt5CoreConfig.cmake b/Qt5Core/Qt5CoreConfig.cmake -index 4232dc7..c35d103 100644 ---- a/Qt5Core/Qt5CoreConfig.cmake -+++ b/Qt5Core/Qt5CoreConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Core) - - set(_Qt5Core_OWN_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/" "${_qt5Core_install_prefix}/include/QtCore") -- set(Qt5Core_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Core_PRIVATE_INCLUDE_DIRS -+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0" -+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0/QtCore" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Core_OWN_INCLUDE_DIRS}) -diff --git a/Qt5DBus/Qt5DBusConfig.cmake b/Qt5DBus/Qt5DBusConfig.cmake -index d5e3ac6..472b928 100644 ---- a/Qt5DBus/Qt5DBusConfig.cmake -+++ b/Qt5DBus/Qt5DBusConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::DBus) - - set(_Qt5DBus_OWN_INCLUDE_DIRS "${_qt5DBus_install_prefix}/include/" "${_qt5DBus_install_prefix}/include/QtDBus") -- set(Qt5DBus_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5DBus_PRIVATE_INCLUDE_DIRS -+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0" -+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0/QtDBus" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5DBus_OWN_INCLUDE_DIRS}) -diff --git a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -index b518994..91559aa 100644 ---- a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -+++ b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::DataVisualization) - - set(_Qt5DataVisualization_OWN_INCLUDE_DIRS "${_qt5DataVisualization_install_prefix}/include/" "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization") -- set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS -+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0" -+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0/QtDataVisualization" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5DataVisualization_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Designer/Qt5DesignerConfig.cmake b/Qt5Designer/Qt5DesignerConfig.cmake -index 69ea6dc..7b76032 100644 ---- a/Qt5Designer/Qt5DesignerConfig.cmake -+++ b/Qt5Designer/Qt5DesignerConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Designer) - - set(_Qt5Designer_OWN_INCLUDE_DIRS "${_qt5Designer_install_prefix}/include/" "${_qt5Designer_install_prefix}/include/QtDesigner") -- set(Qt5Designer_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Designer_PRIVATE_INCLUDE_DIRS -+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0" -+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0/QtDesigner" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Designer_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Gamepad/Qt5GamepadConfig.cmake b/Qt5Gamepad/Qt5GamepadConfig.cmake -index 66db87f..987ae8f 100644 ---- a/Qt5Gamepad/Qt5GamepadConfig.cmake -+++ b/Qt5Gamepad/Qt5GamepadConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Gamepad) - - set(_Qt5Gamepad_OWN_INCLUDE_DIRS "${_qt5Gamepad_install_prefix}/include/" "${_qt5Gamepad_install_prefix}/include/QtGamepad") -- set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS -+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0" -+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0/QtGamepad" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Gamepad_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Gui/Qt5GuiConfig.cmake b/Qt5Gui/Qt5GuiConfig.cmake -index 4718ba9..56888c1 100644 ---- a/Qt5Gui/Qt5GuiConfig.cmake -+++ b/Qt5Gui/Qt5GuiConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Gui) - - set(_Qt5Gui_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/include/" "${_qt5Gui_install_prefix}/include/QtGui") -- set(Qt5Gui_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Gui_PRIVATE_INCLUDE_DIRS -+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0" -+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0/QtGui" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Gui_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Help/Qt5HelpConfig.cmake b/Qt5Help/Qt5HelpConfig.cmake -index e84511c..0da7c20 100644 ---- a/Qt5Help/Qt5HelpConfig.cmake -+++ b/Qt5Help/Qt5HelpConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Help) - - set(_Qt5Help_OWN_INCLUDE_DIRS "${_qt5Help_install_prefix}/include/" "${_qt5Help_install_prefix}/include/QtHelp") -- set(Qt5Help_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Help_PRIVATE_INCLUDE_DIRS -+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0" -+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0/QtHelp" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Help_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Location/Qt5LocationConfig.cmake b/Qt5Location/Qt5LocationConfig.cmake -index a8bdf0a..f5348c2 100644 ---- a/Qt5Location/Qt5LocationConfig.cmake -+++ b/Qt5Location/Qt5LocationConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Location) - - set(_Qt5Location_OWN_INCLUDE_DIRS "${_qt5Location_install_prefix}/include/" "${_qt5Location_install_prefix}/include/QtLocation") -- set(Qt5Location_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Location_PRIVATE_INCLUDE_DIRS -+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0" -+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0/QtLocation" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Location_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Multimedia/Qt5MultimediaConfig.cmake b/Qt5Multimedia/Qt5MultimediaConfig.cmake -index 69f353f..67fa08b 100644 ---- a/Qt5Multimedia/Qt5MultimediaConfig.cmake -+++ b/Qt5Multimedia/Qt5MultimediaConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Multimedia) - - set(_Qt5Multimedia_OWN_INCLUDE_DIRS "${_qt5Multimedia_install_prefix}/include/" "${_qt5Multimedia_install_prefix}/include/QtMultimedia") -- set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS -+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0" -+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0/QtMultimedia" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Multimedia_OWN_INCLUDE_DIRS}) -diff --git a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -index 88162f8..1dcf69e 100644 ---- a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -+++ b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::MultimediaWidgets) - - set(_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS "${_qt5MultimediaWidgets_install_prefix}/include/" "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets") -- set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0" -+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0/QtMultimediaWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Network/Qt5NetworkConfig.cmake b/Qt5Network/Qt5NetworkConfig.cmake -index 1778278..6a5d7f3 100644 ---- a/Qt5Network/Qt5NetworkConfig.cmake -+++ b/Qt5Network/Qt5NetworkConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Network) - - set(_Qt5Network_OWN_INCLUDE_DIRS "${_qt5Network_install_prefix}/include/" "${_qt5Network_install_prefix}/include/QtNetwork") -- set(Qt5Network_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Network_PRIVATE_INCLUDE_DIRS -+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0" -+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0/QtNetwork" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Network_OWN_INCLUDE_DIRS}) -diff --git a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -index 50f56e0..821080c 100644 ---- a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -+++ b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::NetworkAuth) - - set(_Qt5NetworkAuth_OWN_INCLUDE_DIRS "${_qt5NetworkAuth_install_prefix}/include/" "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth") -- set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS -+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0" -+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0/QtNetworkAuth" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5NetworkAuth_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Nfc/Qt5NfcConfig.cmake b/Qt5Nfc/Qt5NfcConfig.cmake -index 83ffddd..d8a5ba9 100644 ---- a/Qt5Nfc/Qt5NfcConfig.cmake -+++ b/Qt5Nfc/Qt5NfcConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Nfc) - - set(_Qt5Nfc_OWN_INCLUDE_DIRS "${_qt5Nfc_install_prefix}/include/" "${_qt5Nfc_install_prefix}/include/QtNfc") -- set(Qt5Nfc_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Nfc_PRIVATE_INCLUDE_DIRS -+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0" -+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0/QtNfc" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Nfc_OWN_INCLUDE_DIRS}) -diff --git a/Qt5OpenGL/Qt5OpenGLConfig.cmake b/Qt5OpenGL/Qt5OpenGLConfig.cmake -index 6c874ac..3ac408a 100644 ---- a/Qt5OpenGL/Qt5OpenGLConfig.cmake -+++ b/Qt5OpenGL/Qt5OpenGLConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::OpenGL) - - set(_Qt5OpenGL_OWN_INCLUDE_DIRS "${_qt5OpenGL_install_prefix}/include/" "${_qt5OpenGL_install_prefix}/include/QtOpenGL") -- set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS -+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0" -+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0/QtOpenGL" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5OpenGL_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Positioning/Qt5PositioningConfig.cmake b/Qt5Positioning/Qt5PositioningConfig.cmake -index 1aa3128..a6a2f24 100644 ---- a/Qt5Positioning/Qt5PositioningConfig.cmake -+++ b/Qt5Positioning/Qt5PositioningConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Positioning) - - set(_Qt5Positioning_OWN_INCLUDE_DIRS "${_qt5Positioning_install_prefix}/include/" "${_qt5Positioning_install_prefix}/include/QtPositioning") -- set(Qt5Positioning_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Positioning_PRIVATE_INCLUDE_DIRS -+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0" -+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0/QtPositioning" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Positioning_OWN_INCLUDE_DIRS}) -diff --git a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -index d7c6765..9a24e99 100644 ---- a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -+++ b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::PrintSupport) - - set(_Qt5PrintSupport_OWN_INCLUDE_DIRS "${_qt5PrintSupport_install_prefix}/include/" "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport") -- set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS -+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0" -+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0/QtPrintSupport" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5PrintSupport_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Purchasing/Qt5PurchasingConfig.cmake b/Qt5Purchasing/Qt5PurchasingConfig.cmake -index b0cf03d..d0b527d 100644 ---- a/Qt5Purchasing/Qt5PurchasingConfig.cmake -+++ b/Qt5Purchasing/Qt5PurchasingConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Purchasing) - - set(_Qt5Purchasing_OWN_INCLUDE_DIRS "${_qt5Purchasing_install_prefix}/include/" "${_qt5Purchasing_install_prefix}/include/QtPurchasing") -- set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS -+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0" -+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0/QtPurchasing" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Purchasing_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Qml/Qt5QmlConfig.cmake b/Qt5Qml/Qt5QmlConfig.cmake -index 966e3ff..c59d5d1 100644 ---- a/Qt5Qml/Qt5QmlConfig.cmake -+++ b/Qt5Qml/Qt5QmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Qml) - - set(_Qt5Qml_OWN_INCLUDE_DIRS "${_qt5Qml_install_prefix}/include/" "${_qt5Qml_install_prefix}/include/QtQml") -- set(Qt5Qml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Qml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0" -+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0/QtQml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Qml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Quick/Qt5QuickConfig.cmake b/Qt5Quick/Qt5QuickConfig.cmake -index e1e2d05..def9557 100644 ---- a/Qt5Quick/Qt5QuickConfig.cmake -+++ b/Qt5Quick/Qt5QuickConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Quick) - - set(_Qt5Quick_OWN_INCLUDE_DIRS "${_qt5Quick_install_prefix}/include/" "${_qt5Quick_install_prefix}/include/QtQuick") -- set(Qt5Quick_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Quick_PRIVATE_INCLUDE_DIRS -+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0" -+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0/QtQuick" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Quick_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickControls2/Qt5QuickControls2Config.cmake b/Qt5QuickControls2/Qt5QuickControls2Config.cmake -index cf34ce5..6f0ec96 100644 ---- a/Qt5QuickControls2/Qt5QuickControls2Config.cmake -+++ b/Qt5QuickControls2/Qt5QuickControls2Config.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickControls2) - - set(_Qt5QuickControls2_OWN_INCLUDE_DIRS "${_qt5QuickControls2_install_prefix}/include/" "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2") -- set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0" -+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0/QtQuickControls2" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickControls2_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickTest/Qt5QuickTestConfig.cmake b/Qt5QuickTest/Qt5QuickTestConfig.cmake -index 9b2b8b2..6e1ea1d 100644 ---- a/Qt5QuickTest/Qt5QuickTestConfig.cmake -+++ b/Qt5QuickTest/Qt5QuickTestConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickTest) - - set(_Qt5QuickTest_OWN_INCLUDE_DIRS "${_qt5QuickTest_install_prefix}/include/" "${_qt5QuickTest_install_prefix}/include/QtQuickTest") -- set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0" -+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0/QtQuickTest" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickTest_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -index b0b8988..559b2f0 100644 ---- a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -+++ b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickWidgets) - - set(_Qt5QuickWidgets_OWN_INCLUDE_DIRS "${_qt5QuickWidgets_install_prefix}/include/" "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets") -- set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0" -+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0/QtQuickWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickWidgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Script/Qt5ScriptConfig.cmake b/Qt5Script/Qt5ScriptConfig.cmake -index da053f8..b2b34d6 100644 ---- a/Qt5Script/Qt5ScriptConfig.cmake -+++ b/Qt5Script/Qt5ScriptConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Script) - - set(_Qt5Script_OWN_INCLUDE_DIRS "${_qt5Script_install_prefix}/include/" "${_qt5Script_install_prefix}/include/QtScript") -- set(Qt5Script_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Script_PRIVATE_INCLUDE_DIRS -+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0" -+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0/QtScript" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Script_OWN_INCLUDE_DIRS}) -diff --git a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -index e4bf959..959ac50 100644 ---- a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -+++ b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::ScriptTools) - - set(_Qt5ScriptTools_OWN_INCLUDE_DIRS "${_qt5ScriptTools_install_prefix}/include/" "${_qt5ScriptTools_install_prefix}/include/QtScriptTools") -- set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS -+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0" -+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0/QtScriptTools" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5ScriptTools_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Scxml/Qt5ScxmlConfig.cmake b/Qt5Scxml/Qt5ScxmlConfig.cmake -index 90ac06b..e78c552 100644 ---- a/Qt5Scxml/Qt5ScxmlConfig.cmake -+++ b/Qt5Scxml/Qt5ScxmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Scxml) - - set(_Qt5Scxml_OWN_INCLUDE_DIRS "${_qt5Scxml_install_prefix}/include/" "${_qt5Scxml_install_prefix}/include/QtScxml") -- set(Qt5Scxml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Scxml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0" -+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0/QtScxml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Scxml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Sensors/Qt5SensorsConfig.cmake b/Qt5Sensors/Qt5SensorsConfig.cmake -index 9e53e4d..2096beb 100644 ---- a/Qt5Sensors/Qt5SensorsConfig.cmake -+++ b/Qt5Sensors/Qt5SensorsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Sensors) - - set(_Qt5Sensors_OWN_INCLUDE_DIRS "${_qt5Sensors_install_prefix}/include/" "${_qt5Sensors_install_prefix}/include/QtSensors") -- set(Qt5Sensors_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Sensors_PRIVATE_INCLUDE_DIRS -+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0" -+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0/QtSensors" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Sensors_OWN_INCLUDE_DIRS}) -diff --git a/Qt5SerialBus/Qt5SerialBusConfig.cmake b/Qt5SerialBus/Qt5SerialBusConfig.cmake -index f2e4d69..8ba391c 100644 ---- a/Qt5SerialBus/Qt5SerialBusConfig.cmake -+++ b/Qt5SerialBus/Qt5SerialBusConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::SerialBus) - - set(_Qt5SerialBus_OWN_INCLUDE_DIRS "${_qt5SerialBus_install_prefix}/include/" "${_qt5SerialBus_install_prefix}/include/QtSerialBus") -- set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS -+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0" -+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0/QtSerialBus" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5SerialBus_OWN_INCLUDE_DIRS}) -diff --git a/Qt5SerialPort/Qt5SerialPortConfig.cmake b/Qt5SerialPort/Qt5SerialPortConfig.cmake -index fa15de5..4ec1024 100644 ---- a/Qt5SerialPort/Qt5SerialPortConfig.cmake -+++ b/Qt5SerialPort/Qt5SerialPortConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::SerialPort) - - set(_Qt5SerialPort_OWN_INCLUDE_DIRS "${_qt5SerialPort_install_prefix}/include/" "${_qt5SerialPort_install_prefix}/include/QtSerialPort") -- set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS -+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0" -+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0/QtSerialPort" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5SerialPort_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Sql/Qt5SqlConfig.cmake b/Qt5Sql/Qt5SqlConfig.cmake -index 0e5d50c..baf3f66 100644 ---- a/Qt5Sql/Qt5SqlConfig.cmake -+++ b/Qt5Sql/Qt5SqlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Sql) - - set(_Qt5Sql_OWN_INCLUDE_DIRS "${_qt5Sql_install_prefix}/include/" "${_qt5Sql_install_prefix}/include/QtSql") -- set(Qt5Sql_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Sql_PRIVATE_INCLUDE_DIRS -+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0" -+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0/QtSql" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Sql_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Svg/Qt5SvgConfig.cmake b/Qt5Svg/Qt5SvgConfig.cmake -index 5d6ad04..b0d1aaa 100644 ---- a/Qt5Svg/Qt5SvgConfig.cmake -+++ b/Qt5Svg/Qt5SvgConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Svg) - - set(_Qt5Svg_OWN_INCLUDE_DIRS "${_qt5Svg_install_prefix}/include/" "${_qt5Svg_install_prefix}/include/QtSvg") -- set(Qt5Svg_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Svg_PRIVATE_INCLUDE_DIRS -+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0" -+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0/QtSvg" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Svg_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Test/Qt5TestConfig.cmake b/Qt5Test/Qt5TestConfig.cmake -index 8183efd..f15979f 100644 ---- a/Qt5Test/Qt5TestConfig.cmake -+++ b/Qt5Test/Qt5TestConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Test) - - set(_Qt5Test_OWN_INCLUDE_DIRS "${_qt5Test_install_prefix}/include/" "${_qt5Test_install_prefix}/include/QtTest") -- set(Qt5Test_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Test_PRIVATE_INCLUDE_DIRS -+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0" -+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0/QtTest" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Test_OWN_INCLUDE_DIRS}) -diff --git a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -index 2577e82..aa4bf39 100644 ---- a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -+++ b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::TextToSpeech) - - set(_Qt5TextToSpeech_OWN_INCLUDE_DIRS "${_qt5TextToSpeech_install_prefix}/include/" "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech") -- set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS -+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0" -+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0/QtTextToSpeech" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5TextToSpeech_OWN_INCLUDE_DIRS}) -diff --git a/Qt5UiTools/Qt5UiToolsConfig.cmake b/Qt5UiTools/Qt5UiToolsConfig.cmake -index f217198..1bfa8b2 100644 ---- a/Qt5UiTools/Qt5UiToolsConfig.cmake -+++ b/Qt5UiTools/Qt5UiToolsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::UiTools) - - set(_Qt5UiTools_OWN_INCLUDE_DIRS "${_qt5UiTools_install_prefix}/include/" "${_qt5UiTools_install_prefix}/include/QtUiTools") -- set(Qt5UiTools_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5UiTools_PRIVATE_INCLUDE_DIRS -+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0" -+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0/QtUiTools" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5UiTools_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WebChannel/Qt5WebChannelConfig.cmake b/Qt5WebChannel/Qt5WebChannelConfig.cmake -index ce8949c..c056b9d 100644 ---- a/Qt5WebChannel/Qt5WebChannelConfig.cmake -+++ b/Qt5WebChannel/Qt5WebChannelConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WebChannel) - - set(_Qt5WebChannel_OWN_INCLUDE_DIRS "${_qt5WebChannel_install_prefix}/include/" "${_qt5WebChannel_install_prefix}/include/QtWebChannel") -- set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS -+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0" -+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0/QtWebChannel" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WebChannel_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WebSockets/Qt5WebSocketsConfig.cmake b/Qt5WebSockets/Qt5WebSocketsConfig.cmake -index c2609da..42e21b8 100644 ---- a/Qt5WebSockets/Qt5WebSocketsConfig.cmake -+++ b/Qt5WebSockets/Qt5WebSocketsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WebSockets) - - set(_Qt5WebSockets_OWN_INCLUDE_DIRS "${_qt5WebSockets_install_prefix}/include/" "${_qt5WebSockets_install_prefix}/include/QtWebSockets") -- set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS -+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0" -+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0/QtWebSockets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WebSockets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Widgets/Qt5WidgetsConfig.cmake b/Qt5Widgets/Qt5WidgetsConfig.cmake -index 44c7aed..658e29a 100644 ---- a/Qt5Widgets/Qt5WidgetsConfig.cmake -+++ b/Qt5Widgets/Qt5WidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Widgets) - - set(_Qt5Widgets_OWN_INCLUDE_DIRS "${_qt5Widgets_install_prefix}/include/" "${_qt5Widgets_install_prefix}/include/QtWidgets") -- set(Qt5Widgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Widgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0" -+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0/QtWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Widgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WinExtras/Qt5WinExtrasConfig.cmake b/Qt5WinExtras/Qt5WinExtrasConfig.cmake -index c63cee3..f9ea776 100644 ---- a/Qt5WinExtras/Qt5WinExtrasConfig.cmake -+++ b/Qt5WinExtras/Qt5WinExtrasConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WinExtras) - - set(_Qt5WinExtras_OWN_INCLUDE_DIRS "${_qt5WinExtras_install_prefix}/include/" "${_qt5WinExtras_install_prefix}/include/QtWinExtras") -- set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS -+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0" -+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0/QtWinExtras" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WinExtras_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Xml/Qt5XmlConfig.cmake b/Qt5Xml/Qt5XmlConfig.cmake -index fee861c..31dc6f7 100644 ---- a/Qt5Xml/Qt5XmlConfig.cmake -+++ b/Qt5Xml/Qt5XmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Xml) - - set(_Qt5Xml_OWN_INCLUDE_DIRS "${_qt5Xml_install_prefix}/include/" "${_qt5Xml_install_prefix}/include/QtXml") -- set(Qt5Xml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Xml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0" -+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0/QtXml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Xml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -index 662a612..45cfe8b 100644 ---- a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -+++ b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::XmlPatterns) - - set(_Qt5XmlPatterns_OWN_INCLUDE_DIRS "${_qt5XmlPatterns_install_prefix}/include/" "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns") -- set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS -+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0" -+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0/QtXmlPatterns" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5XmlPatterns_OWN_INCLUDE_DIRS}) - diff --git a/ports/qt5/configure_qt.cmake b/ports/qt5/configure_qt.cmake deleted file mode 100644 index 21e3384c10..0000000000 --- a/ports/qt5/configure_qt.cmake +++ /dev/null @@ -1,62 +0,0 @@ -function(configure_qt) - cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - if (_csc_PLATFORM) - set(PLATFORM ${_csc_PLATFORM}) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(PLATFORM "win32-msvc2015") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(PLATFORM "win32-msvc2017") - 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) - set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS - "-static" - "-static-runtime" - ) - endif() - - 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_PACKAGES_DIR} - -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -plugindir ${CURRENT_PACKAGES_DIR}/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - - 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_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") -endfunction() \ No newline at end of file diff --git a/ports/qt5/fix-commandline-overrides.patch b/ports/qt5/fix-commandline-overrides.patch deleted file mode 100644 index 08f6277405..0000000000 --- a/ports/qt5/fix-commandline-overrides.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff --git a/qtbase/configure.json b/qtbase/configure.json -index f774291..8903df0 100644 ---- a/qtbase/configure.json -+++ b/qtbase/configure.json -@@ -19,8 +19,7 @@ - "commandline": { - "assignments": { - "DBUS_HOST_PATH": "host_dbus.prefix", -- "DBUS_PATH": "dbus.prefix", -- "ZLIB_LIBS": "zlib.libs" -+ "DBUS_PATH": "dbus.prefix" - }, - "custom": "qmakeArgs", - "options": { -diff --git a/qtbase/mkspecs/features/qt_configure.prf b/qtbase/mkspecs/features/qt_configure.prf -index eaaa161..fdec8ea 100644 ---- a/qtbase/mkspecs/features/qt_configure.prf -+++ b/qtbase/mkspecs/features/qt_configure.prf -@@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) { - } - - defineTest(qtConfSetupLibraries) { -+ asspfx = $${currentConfig}.commandline.assignments - for (l, $${currentConfig}.libraries._KEYS_) { - lpfx = $${currentConfig}.libraries.$${l} - # 'export' may be omitted, in which case it falls back to the library's name -@@ -408,6 +409,15 @@ defineTest(qtConfSetupLibraries) { - $${lpfx}.export = $$l - export($${lpfx}.export) - } -+ # 'export' may also be empty, but we need a derived identifier -+ alias = $$eval($${lpfx}.export) -+ isEmpty(alias): alias = $$l -+ $${lpfx}.alias = $$alias -+ export($${lpfx}.alias) -+ # make it easy to refer to the library by its export name. -+ $${currentConfig}.exports._KEYS_ += $$alias -+ $${currentConfig}.exports.$$alias += $$l -+ export($${currentConfig}.exports.$$alias) - isEmpty($${lpfx}.sources._KEYS_): \ - error("Library $$l defines no sources") - for (s, $${lpfx}.sources._KEYS_) { -@@ -427,10 +437,35 @@ defineTest(qtConfSetupLibraries) { - } - } - } -+ -+ $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_) -+ export($${currentConfig}.exports._KEYS_) -+ -+ for (alias, $${currentConfig}.exports._KEYS_) { -+ ua = $$upper($$alias) -+ $${asspfx}._KEYS_ += \ -+ $${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \ -+ $${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE -+ uapfx = $${asspfx}.$${ua} -+ $${uapfx}_PREFIX = $${alias}.prefix -+ $${uapfx}_INCDIR = $${alias}.incdir -+ $${uapfx}_LIBDIR = $${alias}.libdir -+ $${uapfx}_LIBS = $${alias}.libs -+ $${uapfx}_LIBS_DEBUG = $${alias}.libs.debug -+ $${uapfx}_LIBS_RELEASE = $${alias}.libs.release -+ export($${uapfx}_PREFIX) -+ export($${uapfx}_INCDIR) -+ export($${uapfx}_LIBDIR) -+ export($${uapfx}_LIBS) -+ export($${uapfx}_LIBS_DEBUG) -+ export($${uapfx}_LIBS_RELEASE) -+ } -+ export($${asspfx}._KEYS_) -+ - - # reverse mapping for assignments on command line. -- for (a, $${currentConfig}.commandline.assignments._KEYS_) { -- apfx = $${currentConfig}.commandline.assignments.$${a} -+ for (a, $${asspfx}._KEYS_) { -+ apfx = $${asspfx}.$${a} - ra = config.commandline.rev_assignments.$$eval($$apfx) - $$ra = $$a - export($$ra) -@@ -479,6 +514,18 @@ defineTest(qtConfLibrary_inline) { - export($${1}.libs) - } - -+ incdir = $$val_escape(config.input.$${input}.incdir) -+ !isEmpty(incdir) { -+ $${1}.includedir = $$incdir -+ export($${1}.includedir) -+ } -+ -+ libdir = $$val_escape(config.input.$${input}.libdir) -+ !isEmpty(libdir) { -+ $${1}.libs = "-L$$libdir $$eval($${1}.libs)" -+ export($${1}.libs) -+ } -+ - return(true) - } - -diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json -index 1f50116..af03362 100644 ---- a/qtbase/src/gui/configure.json -+++ b/qtbase/src/gui/configure.json -@@ -100,7 +100,7 @@ - "test": "unix/freetype", - "sources": [ - { "type": "pkgConfig", "args": "freetype2" }, -- { "type": "freetype", "libs": "-lfreetype" } -+ { "libs": "-lfreetype" } - ] - }, - "fontconfig": { -diff --git a/qtbase/src/network/configure.json b/qtbase/src/network/configure.json -index 1e08aa7..314970e 100644 ---- a/qtbase/src/network/configure.json -+++ b/qtbase/src/network/configure.json -@@ -7,9 +7,6 @@ - - "commandline": { - "assignments": { -- "OPENSSL_LIBS": "openssl.libs", -- "OPENSSL_LIBS_DEBUG": "openssl.libs.debug", -- "OPENSSL_LIBS_RELEASE": "openssl.libs.release", - "OPENSSL_PATH": "openssl.prefix" - }, - "options": { -diff --git a/qtbase/src/sql/configure.json b/qtbase/src/sql/configure.json -index 96c82e8..51a7e51 100644 ---- a/qtbase/src/sql/configure.json -+++ b/qtbase/src/sql/configure.json -@@ -8,7 +8,6 @@ - "commandline": { - "assignments": { - "MYSQL_PATH": "mysql.prefix", -- "PSQL_LIBS": "psql.libs", - "SYBASE": "tds.prefix", - "SYBASE_LIBS": "tds.libs" - }, -@@ -71,8 +70,8 @@ - "sources": [ - { "type": "pkgConfig", "args": "libpq" }, - { "type": "psqlConfig" }, -- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, -- { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" } -+ { "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, -+ { "libs": "-lpq", "condition": "!config.win32" } - ] - }, - "tds": { diff --git a/ports/qt5/fix-qalgorithms-vs2017.patch b/ports/qt5/fix-qalgorithms-vs2017.patch deleted file mode 100644 index eab41c0c3e..0000000000 --- a/ports/qt5/fix-qalgorithms-vs2017.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff --git a/qtbase/src/corelib/tools/qalgorithms.h b/qtbase/src/corelib/tools/qalgorithms.h -index 303374b..7e84695 100644 ---- a/qtbase/src/corelib/tools/qalgorithms.h -+++ b/qtbase/src/corelib/tools/qalgorithms.h -@@ -589,15 +589,16 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO - return __builtin_popcountll(v); - } - #elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM) -+#define QT_POPCOUNT_CONSTEXPR - #define QT_HAS_BUILTIN_CTZ --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val) - { - unsigned long result; - _BitScanForward(&result, val); - return result; - } - #define QT_HAS_BUILTIN_CLZ --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) - { - unsigned long result; - _BitScanReverse(&result, val); -@@ -610,7 +611,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) - #if Q_PROCESSOR_WORDSIZE == 8 - // These are only defined for 64bit builds. - #define QT_HAS_BUILTIN_CTZLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) - { - unsigned long result; - _BitScanForward64(&result, val); -@@ -618,7 +619,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) - } - // MSVC calls it _BitScanReverse and returns the carry flag, which we don't need - #define QT_HAS_BUILTIN_CLZLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) - { - unsigned long result; - _BitScanReverse64(&result, val); -@@ -628,31 +629,31 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) - } - #endif // MSVC 64bit - # define QT_HAS_BUILTIN_CTZS --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW - { - return qt_builtin_ctz(v); - } - #define QT_HAS_BUILTIN_CLZS --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW - { - return qt_builtin_clz(v) - 16U; - } - #define QALGORITHMS_USE_BUILTIN_POPCOUNT --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW - { - return __popcnt(v); - } --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW - { - return __popcnt16(v); - } --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW - { - return __popcnt16(v); - } - #if Q_PROCESSOR_WORDSIZE == 8 - #define QALGORITHMS_USE_BUILTIN_POPCOUNTLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW - { - return __popcnt64(v); - } -@@ -660,9 +661,13 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO - #endif // MSVC - #endif // QT_HAS_CONSTEXPR_BUILTINS - -+#ifndef QT_POPCOUNT_CONSTEXPR -+#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR -+#endif -+ - } //namespace QAlgorithmsPrivate - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -675,7 +680,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -685,7 +690,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_ - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -696,7 +701,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTLL - return QAlgorithmsPrivate::qt_builtin_popcountll(v); -@@ -711,7 +716,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW - { - return qPopulationCount(static_cast(v)); - } -@@ -719,6 +724,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigne - #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - #undef QALGORITHMS_USE_BUILTIN_POPCOUNT - #endif -+#undef QT_POPCOUNT_CONSTEXPR - - Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint32 v) Q_DECL_NOTHROW - { diff --git a/ports/qt5/fixcmake.py b/ports/qt5/fixcmake.py deleted file mode 100644 index b081af58e8..0000000000 --- a/ports/qt5/fixcmake.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -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") - for line in openedfile: - if "_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: - # Qt5AxServer(d).lib has been moved to manual-link: - if '_qt5AxServer_install_prefix' in line: - line = line.replace('/lib/', '/lib/manual-link/') - - 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}/lib/qtmaind.lib" in line: - # qtmaind.lib has been moved to manual-link: - builder += line.replace("/lib/", "/debug/lib/manual-link/") - 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 "_install_prefix}/lib/qtmain.lib" in line: - # qtmain(d).lib has been moved to manual-link: - builder += line.replace("/lib/", "/lib/manual-link/") - builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" - builder += "\n" - builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" - builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" - builder += " )\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5/install_qt.cmake b/ports/qt5/install_qt.cmake deleted file mode 100644 index 1b0bec9353..0000000000 --- a/ports/qt5/install_qt.cmake +++ /dev/null @@ -1,45 +0,0 @@ -function(install_qt) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) - - if (_bc_DISABLE_PARALLEL) - set(JOBS "1") - else() - set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") - endif() - - vcpkg_find_acquire_program(JOM) - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") - set(_path "$ENV{PATH}") - - message(STATUS "Package ${TARGET_TRIPLET}-rel") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - set(ENV{PATH} "${_path}") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") -endfunction() \ No newline at end of file diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake deleted file mode 100644 index 4b852e95cd..0000000000 --- a/ports/qt5/portfile.cmake +++ /dev/null @@ -1,147 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -include(configure_qt) -include(install_qt) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.7z" - FILENAME "qt-5.8.0.7z" - SHA512 4c8e7931f0c48318871242c12c2d6f5406be40e037f18690017198a79ef40a72d4319ecb1b8fb5f97c080dbe30174ceb5fd604b3fab22489f977cbeee3e8abe7 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0 ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-qalgorithms-vs2017.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-commandline-overrides.patch" -) - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -configure_qt( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -confirm-license - -opensource - -system-zlib - -system-libjpeg - -system-libpng - -system-freetype - -system-pcre - -system-harfbuzz - -system-doubleconversion - -system-sqlite - -sql-sqlite - -sql-psql - -nomake examples -nomake tests - -skip webengine - -opengl desktop # other options are "-no-opengl" and "-opengl angle" - -mp - LIBJPEG_LIBS="-ljpeg" - OPTIONS_RELEASE - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - OPTIONS_DEBUG - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PCRE_LIBS="-lpcre16d" - PSQL_LIBS="-llibpqd" - FREETYPE_LIBS="-lfreetyped" -) -install_qt() - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/lib/cmake - PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-private-header-paths.patch" -) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(REMOVE ${BINARY_TOOLS}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -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}) - - -#--------------------------------------------------------------------------- -# Qt5Bootstrap: a release-only dependency -#--------------------------------------------------------------------------- -# Remove release-only Qt5Bootstrap.lib from debug folders: -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -# Above approach does not work: -# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) -# requires the two sets to be of equal size! -# Alt. approach, create dummy folder instead: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -#--------------------------------------------------------------------------- - -#--------------------------------------------------------------------------- -# 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: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -# -# Either have users explicitly link against qtmain.lib, qtmaind.lib: -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) -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) -# -# ... or have users explicitly link against Qt5AxServer.lib, Qt5AxServerd.lib: -file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl) -#--------------------------------------------------------------------------- - -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright) -if(EXISTS ${CURRENT_PACKAGES_DIR}/plugins) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/plugins) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) -endif() diff --git a/ports/qt5/qtdeploy.ps1 b/ports/qt5/qtdeploy.ps1 deleted file mode 100644 index 9d514e411b..0000000000 --- a/ports/qt5/qtdeploy.ps1 +++ /dev/null @@ -1,68 +0,0 @@ -# This script is based on the implementation of windeployqt for qt5.7.1 -# -# Qt's plugin deployment strategy is that each main Qt Module has a hardcoded -# set of plugin subdirectories. Each of these subdirectories is deployed in -# full if that Module is referenced. -# -# This hardcoded list is found inside qttools\src\windeployqt\main.cpp. For -# updating, inspect the symbols qtModuleEntries and qtModuleForPlugin. - -# Note: this function signature and behavior is depended upon by applocal.ps1 -function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { - - function deployPlugins([string]$pluginSubdirName) { - if (Test-Path "$QtPluginsDir\$pluginSubdirName") { - Write-Verbose " Deploying plugins directory '$pluginSubdirName'" - New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null - Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { - deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name - } - } else { - Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" - } - } - - # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping. - if ($targetBinaryName -like "Qt5Gui*.dll") { - Write-Verbose " Deploying platforms" - New-Item "$targetBinaryDir\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null - Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % { - deployBinary "$targetBinaryDir\platforms" "$QtPluginsDir\platforms" $_.Name - } - - deployPlugins "accessible" - deployPlugins "imageformats" - deployPlugins "iconengines" - deployPlugins "platforminputcontexts" - } elseif ($targetBinaryName -like "Qt5Network*.dll") { - deployPlugins "bearer" - } elseif ($targetBinaryName -like "Qt5Sql*.dll") { - deployPlugins "sqldrivers" - } elseif ($targetBinaryName -like "Qt5Multimedia*.dll") { - deployPlugins "audio" - deployPlugins "mediaservice" - deployPlugins "playlistformats" - } elseif ($targetBinaryName -like "Qt5PrintSupport*.dll") { - deployPlugins "printsupport" - } elseif ($targetBinaryName -like "Qt5Quick*.dll") { - deployPlugins "scenegraph" - deployPlugins "qmltooling" - } elseif ($targetBinaryName -like "Qt5Declarative*.dll") { - deployPlugins "qml1tooling" - } elseif ($targetBinaryName -like "Qt5Positioning*.dll") { - deployPlugins "position" - } elseif ($targetBinaryName -like "Qt5Location*.dll") { - deployPlugins "geoservices" - } elseif ($targetBinaryName -like "Qt5Sensors*.dll") { - deployPlugins "sensors" - deployPlugins "sensorgestures" - } elseif ($targetBinaryName -like "Qt5WebEngineCore*.dll") { - deployPlugins "qtwebengine" - } elseif ($targetBinaryName -like "Qt53DRenderer*.dll") { - deployPlugins "sceneparsers" - } elseif ($targetBinaryName -like "Qt5TextToSpeech*.dll") { - deployPlugins "texttospeech" - } elseif ($targetBinaryName -like "Qt5SerialBus*.dll") { - deployPlugins "canbus" - } -} From 3ba22c17540fc761c4fb3410ccd75cecb0f1f8b5 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:04:16 +1100 Subject: [PATCH 4/8] working qt tools build --- ports/qt5base/configure_qt.cmake | 5 +- ports/qt5base/fix-debug-qmakespecs.patch | 62 +++++++++++++++++++ ports/qt5base/portfile.cmake | 27 +++----- ports/qt5declarative/CONTROL | 4 ++ ports/qt5declarative/portfile.cmake | 44 +++++++++++++ ports/qt5doc/CONTROL | 4 ++ ports/qt5doc/portfile.cmake | 44 +++++++++++++ ports/qt5tools/portfile.cmake | 21 ++++--- ports/qt5winextras/CONTROL | 4 ++ ports/qt5winextras/portfile.cmake | 44 +++++++++++++ scripts/cmake/vcpkg_build_qmake.cmake | 4 +- scripts/cmake/vcpkg_build_qmake_debug.cmake | 29 +++++++++ scripts/cmake/vcpkg_build_qmake_release.cmake | 29 +++++++++ scripts/cmake/vcpkg_common_functions.cmake | 4 ++ .../cmake/vcpkg_configure_qmake_debug.cmake | 41 ++++++++++++ .../cmake/vcpkg_configure_qmake_release.cmake | 43 +++++++++++++ 16 files changed, 378 insertions(+), 31 deletions(-) create mode 100644 ports/qt5base/fix-debug-qmakespecs.patch create mode 100644 ports/qt5declarative/CONTROL create mode 100644 ports/qt5declarative/portfile.cmake create mode 100644 ports/qt5doc/CONTROL create mode 100644 ports/qt5doc/portfile.cmake create mode 100644 ports/qt5winextras/CONTROL create mode 100644 ports/qt5winextras/portfile.cmake create mode 100644 scripts/cmake/vcpkg_build_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_build_qmake_release.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_release.cmake diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake index fea8de923b..315c48bdf2 100644 --- a/ports/qt5base/configure_qt.cmake +++ b/ports/qt5base/configure_qt.cmake @@ -29,10 +29,11 @@ function(configure_qt) -debug -prefix ${CURRENT_PACKAGES_DIR}/debug -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml + -headerdir ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include -I ${CURRENT_INSTALLED_DIR}/include -L ${CURRENT_INSTALLED_DIR}/debug/lib -platform ${PLATFORM} diff --git a/ports/qt5base/fix-debug-qmakespecs.patch b/ports/qt5base/fix-debug-qmakespecs.patch new file mode 100644 index 0000000000..2e069cfebb --- /dev/null +++ b/ports/qt5base/fix-debug-qmakespecs.patch @@ -0,0 +1,62 @@ +diff --git a/mkspecs/modules/qt_lib_gui_private.pri b/mkspecs/modules/qt_lib_gui_private.pri +index 5473e78..c5e7448 100644 +--- a/mkspecs/modules/qt_lib_gui_private.pri ++++ b/mkspecs/modules/qt_lib_gui_private.pri +@@ -11,4 +11,9 @@ QT.gui_private.enabled_features = direct2d directwrite directwrite2 freetype gif + QT.gui_private.disabled_features = xcb accessibility-atspi-bridge angle_d3d11_qdtd directfb egl egl_x11 eglfs eglfs_brcm eglfs_egldevice eglfs_gbm eglfs_mali eglfs_viv eglfs_viv_wl evdev fontconfig integrityfb integrityhid kms libinput libinput-axis-api linuxfb mirclient mtdev system-freetype system-xcb tslib vnc xkbcommon-evdev xlib + QMAKE_LIBS_HARFBUZZ = -lharfbuzz + QMAKE_LIBS_LIBJPEG = -ljpeg +-QMAKE_LIBS_LIBPNG = -llibpng16 ++CONFIG(release, debug|release) { ++ QMAKE_LIBS_LIBPNG = -llibpng16 ++} ++CONFIG(debug, debug|release) { ++ QMAKE_LIBS_LIBPNG = -llibpng16d ++} +diff --git a/mkspecs/qconfig.pri b/mkspecs/qconfig.pri +index 2af37df..646b8e5 100644 +--- a/mkspecs/qconfig.pri ++++ b/mkspecs/qconfig.pri +@@ -2,8 +2,14 @@ QT_ARCH = x86_64 + QT_BUILDABI = x86_64-little_endian-lp64 + QT.global.enabled_features = shared c++11 concurrent + QT.global.disabled_features = cross_compile framework rpath appstore-compliant debug_and_release simulator_and_device build_all c++14 c++1z pkg-config force_asserts separate_debug_info static +-QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl +-CONFIG += shared release no_plugin_manifest ++CONFIG(release, debug|release) { ++ QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl ++ CONFIG += shared release no_plugin_manifest ++} ++CONFIG(debug, debug|release) { ++ QT_CONFIG += shared debug c++11 concurrent dbus no-pkg-config release_tools stl ++ CONFIG += shared debug no_plugin_manifest ++} + QT_VERSION = 5.9.2 + QT_MAJOR_VERSION = 5 + QT_MINOR_VERSION = 9 +diff --git a/mkspecs/qmodule.pri b/mkspecs/qmodule.pri +index 3e213d4..00a37ca 100644 +--- a/mkspecs/qmodule.pri ++++ b/mkspecs/qmodule.pri +@@ -1,10 +1,17 @@ + EXTRA_INCLUDEPATH += C:/vcpkg/installed/x64-windows/include +-EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib ++CONFIG(release, debug|release) { ++ EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib ++ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml ++ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong ++ QMAKE_LIBS_ZLIB = -lzlib ++} ++CONFIG(debug, debug|release) { ++ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug release_tools sql system-zlib testlib widgets xml ++ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations stack-protector-strong ++ QMAKE_LIBS_ZLIB = -lzlibd ++} + QT_CPU_FEATURES.x86_64 = sse sse2 +-QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml +-QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong + QT_COORD_TYPE = double +-QMAKE_LIBS_ZLIB = -lzlib + CONFIG += sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 compile_examples f16c largefile msvc_mp precompile_header + QT_BUILD_PARTS += libs tools + QT_HOST_CFLAGS_DBUS += diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 359c81990b..047f167fba 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -70,16 +70,22 @@ configure_qt( install_qt() +#vcpkg_apply_patches( +# SOURCE_PATH ${CURRENT_PACKAGES_DIR}/share/qt5 +# PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-debug-qmakespecs.patch" +#) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py @@ -89,21 +95,4 @@ vcpkg_execute_required_process( vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -#--------------------------------------------------------------------------- -# Qt5Bootstrap: a release-only dependency -#--------------------------------------------------------------------------- -# Remove release-only Qt5Bootstrap.lib from debug folders: -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -# Above approach does not work: -# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) -# requires the two sets to be of equal size! -# Alt. approach, create dummy folder instead: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -#--------------------------------------------------------------------------- - file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) \ No newline at end of file diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL new file mode 100644 index 0000000000..67ffc3212f --- /dev/null +++ b/ports/qt5declarative/CONTROL @@ -0,0 +1,4 @@ +Source: qt5declarative +Version: 5.9.2-0 +Description: Qt5 Declarative (Quick 2) +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake new file mode 100644 index 0000000000..b6a24946bf --- /dev/null +++ b/ports/qt5declarative/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdeclarative-5.9.2") +set(ARCHIVE_NAME "qtdeclarative-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# 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(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + +vcpkg_configure_qmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + OPTIONS "CONFIG+=debug_and_release" +) + +vcpkg_build_qmake() diff --git a/ports/qt5doc/CONTROL b/ports/qt5doc/CONTROL new file mode 100644 index 0000000000..aef693586c --- /dev/null +++ b/ports/qt5doc/CONTROL @@ -0,0 +1,4 @@ +Source: qt5doc +Version: 5.9.2-0 +Description: Qt5 Document Creation Module +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5doc/portfile.cmake b/ports/qt5doc/portfile.cmake new file mode 100644 index 0000000000..9cacc81667 --- /dev/null +++ b/ports/qt5doc/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdoc-5.9.2") +set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 6d01d63330..2a2e5cd4df 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -31,19 +31,24 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") -#Clean up build directories -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) - -vcpkg_configure_qmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - OPTIONS "CONFIG+=release" +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake() +vcpkg_build_qmake_debug() -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/bin/*.exe") +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL new file mode 100644 index 0000000000..67117a9fac --- /dev/null +++ b/ports/qt5winextras/CONTROL @@ -0,0 +1,4 @@ +Source: qt5winextras +Version: 5.9.2-0 +Description: Qt5 Windows extras +Build-Depends: qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake new file mode 100644 index 0000000000..678a8a2145 --- /dev/null +++ b/ports/qt5winextras/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtwinextras-5.9.2") +set(ARCHIVE_NAME "qtwinextras-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index bee5da7c9e..693f7841ed 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -15,7 +15,7 @@ function(vcpkg_build_qmake) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used - set(ENV_PATH_BACKUP ENV{PATH}) + set(ENV_PATH_BACKUP "$ENV{PATH}") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}") @@ -27,5 +27,5 @@ function(vcpkg_build_qmake) message(STATUS "Package ${TARGET_TRIPLET} done") # Restore the original value of ENV{PATH} - set(ENV{PATH} ENV_PATH_BACKUP) + set(ENV{PATH} "${ENV_PATH_BACKUP}") endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake new file mode 100644 index 0000000000..7e5625850a --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -0,0 +1,29 @@ +#.rst: +# .. command:: vcpkg_build_qmake_debug +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake_debug. +# +# :: +# vcpkg_build_qmake_debug() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake_debug) + vcpkg_find_acquire_program(JOM) + + # Make sure that the linker finds the libraries used + set(ENV_PATH_BACKUP "$ENV{PATH}") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/debug/tools/qt5;$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + + # Restore the original value of ENV{PATH} + set(ENV{PATH} "${ENV_PATH_BACKUP}") +endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake new file mode 100644 index 0000000000..6cfbcdc919 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -0,0 +1,29 @@ +#.rst: +# .. command:: vcpkg_build_qmake_release +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake_release. +# +# :: +# vcpkg_build_qmake_release() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake_release) + vcpkg_find_acquire_program(JOM) + + # Make sure that the linker finds the libraries used + set(ENV_PATH_BACKUP "$ENV{PATH}") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + # Restore the original value of ENV{PATH} + set(ENV{PATH} "${ENV_PATH_BACKUP}") +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e58138..5dabd446e1 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -10,11 +10,15 @@ include(vcpkg_from_bitbucket) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) +include(vcpkg_build_qmake_debug) +include(vcpkg_build_qmake_release) include(vcpkg_install_cmake) include(vcpkg_install_meson) include(vcpkg_configure_cmake) include(vcpkg_configure_meson) include(vcpkg_configure_qmake) +include(vcpkg_configure_qmake_debug) +include(vcpkg_configure_qmake_release) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake new file mode 100644 index 0000000000..0166973d2c --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -0,0 +1,41 @@ +#.rst: +# .. command:: vcpkg_configure_qmake_debug +# +# Configure a qmake-based project. +# This sets the config variable to debug and outputs to +# a debug triplet directory. +# +# :: +# vcpkg_configure_qmake_debug(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``SOURCE_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake_debug) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/debug/tools/qt5) + + if(NOT QMAKE_COMMAND) + message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + 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} -d ${_csc_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake new file mode 100644 index 0000000000..67bdbdfb00 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -0,0 +1,43 @@ +#.rst: +# .. command:: vcpkg_configure_qmake_release +# +# Configure a qmake-based project. +# This sets the config variable to release and outputs to +# a release triplet directory. +# +# :: +# vcpkg_configure_qmake_release(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``SOURCE_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake_release) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + + if(NOT QMAKE_COMMAND) + message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + 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} -d ${_csc_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + unset(QMAKE_COMMAND PARENT_SCOPE) + unset(QMAKE_COMMAND CACHE) +endfunction() \ No newline at end of file From d28de4a13edca249086e3ccf8d34e92ecb10006d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:56:47 +1100 Subject: [PATCH 5/8] qt5winextras --- ports/qt5base/fix-debug-qmakespecs.patch | 62 ------------------- ports/qt5base/install_qt.cmake | 1 - ports/qt5base/portfile.cmake | 7 --- ports/qt5winextras/fixcmake.py | 48 ++++++++++++++ ports/qt5winextras/portfile.cmake | 41 +++++++++++- .../cmake/vcpkg_configure_qmake_debug.cmake | 3 + .../cmake/vcpkg_configure_qmake_release.cmake | 1 + 7 files changed, 90 insertions(+), 73 deletions(-) delete mode 100644 ports/qt5base/fix-debug-qmakespecs.patch create mode 100644 ports/qt5winextras/fixcmake.py diff --git a/ports/qt5base/fix-debug-qmakespecs.patch b/ports/qt5base/fix-debug-qmakespecs.patch deleted file mode 100644 index 2e069cfebb..0000000000 --- a/ports/qt5base/fix-debug-qmakespecs.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/mkspecs/modules/qt_lib_gui_private.pri b/mkspecs/modules/qt_lib_gui_private.pri -index 5473e78..c5e7448 100644 ---- a/mkspecs/modules/qt_lib_gui_private.pri -+++ b/mkspecs/modules/qt_lib_gui_private.pri -@@ -11,4 +11,9 @@ QT.gui_private.enabled_features = direct2d directwrite directwrite2 freetype gif - QT.gui_private.disabled_features = xcb accessibility-atspi-bridge angle_d3d11_qdtd directfb egl egl_x11 eglfs eglfs_brcm eglfs_egldevice eglfs_gbm eglfs_mali eglfs_viv eglfs_viv_wl evdev fontconfig integrityfb integrityhid kms libinput libinput-axis-api linuxfb mirclient mtdev system-freetype system-xcb tslib vnc xkbcommon-evdev xlib - QMAKE_LIBS_HARFBUZZ = -lharfbuzz - QMAKE_LIBS_LIBJPEG = -ljpeg --QMAKE_LIBS_LIBPNG = -llibpng16 -+CONFIG(release, debug|release) { -+ QMAKE_LIBS_LIBPNG = -llibpng16 -+} -+CONFIG(debug, debug|release) { -+ QMAKE_LIBS_LIBPNG = -llibpng16d -+} -diff --git a/mkspecs/qconfig.pri b/mkspecs/qconfig.pri -index 2af37df..646b8e5 100644 ---- a/mkspecs/qconfig.pri -+++ b/mkspecs/qconfig.pri -@@ -2,8 +2,14 @@ QT_ARCH = x86_64 - QT_BUILDABI = x86_64-little_endian-lp64 - QT.global.enabled_features = shared c++11 concurrent - QT.global.disabled_features = cross_compile framework rpath appstore-compliant debug_and_release simulator_and_device build_all c++14 c++1z pkg-config force_asserts separate_debug_info static --QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl --CONFIG += shared release no_plugin_manifest -+CONFIG(release, debug|release) { -+ QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl -+ CONFIG += shared release no_plugin_manifest -+} -+CONFIG(debug, debug|release) { -+ QT_CONFIG += shared debug c++11 concurrent dbus no-pkg-config release_tools stl -+ CONFIG += shared debug no_plugin_manifest -+} - QT_VERSION = 5.9.2 - QT_MAJOR_VERSION = 5 - QT_MINOR_VERSION = 9 -diff --git a/mkspecs/qmodule.pri b/mkspecs/qmodule.pri -index 3e213d4..00a37ca 100644 ---- a/mkspecs/qmodule.pri -+++ b/mkspecs/qmodule.pri -@@ -1,10 +1,17 @@ - EXTRA_INCLUDEPATH += C:/vcpkg/installed/x64-windows/include --EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib -+CONFIG(release, debug|release) { -+ EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib -+ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml -+ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong -+ QMAKE_LIBS_ZLIB = -lzlib -+} -+CONFIG(debug, debug|release) { -+ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug release_tools sql system-zlib testlib widgets xml -+ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations stack-protector-strong -+ QMAKE_LIBS_ZLIB = -lzlibd -+} - QT_CPU_FEATURES.x86_64 = sse sse2 --QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml --QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong - QT_COORD_TYPE = double --QMAKE_LIBS_ZLIB = -lzlib - CONFIG += sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 compile_examples f16c largefile msvc_mp precompile_header - QT_BUILD_PARTS += libs tools - QT_HOST_CFLAGS_DBUS += diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake index 1b0bec9353..922303aba5 100644 --- a/ports/qt5base/install_qt.cmake +++ b/ports/qt5base/install_qt.cmake @@ -10,7 +10,6 @@ function(install_qt) vcpkg_find_acquire_program(JOM) vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 047f167fba..5368c3a4ae 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -70,15 +70,8 @@ configure_qt( install_qt() -#vcpkg_apply_patches( -# SOURCE_PATH ${CURRENT_PACKAGES_DIR}/share/qt5 -# PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-debug-qmakespecs.patch" -#) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) diff --git a/ports/qt5winextras/fixcmake.py b/ports/qt5winextras/fixcmake.py new file mode 100644 index 0000000000..d55ca77546 --- /dev/null +++ b/ports/qt5winextras/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +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") + for line in openedfile: + if "_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 exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 678a8a2145..800e3490bb 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -31,14 +31,49 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) vcpkg_build_qmake_release() -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake ) -vcpkg_build_qmake_debug() \ No newline at end of file +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5winextras RENAME copyright) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake index 0166973d2c..e3dfb07778 100644 --- a/scripts/cmake/vcpkg_configure_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -38,4 +38,7 @@ function(vcpkg_configure_qmake_debug) LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + unset(QMAKE_COMMAND) + unset(QMAKE_COMMAND PARENT_SCOPE) + unset(QMAKE_COMMAND CACHE) endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index 67bdbdfb00..8ab5340e93 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -38,6 +38,7 @@ function(vcpkg_configure_qmake_release) LOGNAME config-${TARGET_TRIPLET}-rel ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + unset(QMAKE_COMMAND) unset(QMAKE_COMMAND PARENT_SCOPE) unset(QMAKE_COMMAND CACHE) endfunction() \ No newline at end of file From c147fc78c919d6084e5f98a574484346d590f00d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 03:15:30 +1100 Subject: [PATCH 6/8] further fixes --- ports/qt5base/qt_debug.conf | 13 +++++ ports/qt5base/qt_release.conf | 13 +++++ ports/qt5declarative/fixcmake.py | 48 ++++++++++++++++++ ports/qt5declarative/portfile.cmake | 49 +++++++++++++++++-- ports/qt5doc/CONTROL | 4 -- ports/qt5docs/CONTROL | 4 ++ ports/{qt5doc => qt5docs}/portfile.cmake | 10 ++-- ports/qt5tools/fixcmake.py | 48 ++++++++++++++++++ ports/qt5tools/portfile.cmake | 32 ++++++++++++ ports/qt5winextras/portfile.cmake | 6 +-- scripts/cmake/vcpkg_build_qmake_debug.cmake | 3 +- scripts/cmake/vcpkg_build_qmake_release.cmake | 5 +- 12 files changed, 214 insertions(+), 21 deletions(-) create mode 100644 ports/qt5base/qt_debug.conf create mode 100644 ports/qt5base/qt_release.conf create mode 100644 ports/qt5declarative/fixcmake.py delete mode 100644 ports/qt5doc/CONTROL create mode 100644 ports/qt5docs/CONTROL rename ports/{qt5doc => qt5docs}/portfile.cmake (91%) create mode 100644 ports/qt5tools/fixcmake.py diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf new file mode 100644 index 0000000000..96e4a2a4dc --- /dev/null +++ b/ports/qt5base/qt_debug.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = C:/vcpkg/installed/x64-windows +Documentation = share/qt5/debug/doc +Headers = share/qt5/debug/include +Libraries = debug/lib +Binaries = debug/tools/qt5 +LibraryExecutables = debug/tools/qt5 +Plugins = debug/plugins +Qml2Imports = qml +Data = share/qt5/debug +ArchData = share/qt5/debug +HostData = share/qt5/debug +HostBinaries = debug/tools/qt5 \ No newline at end of file diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf new file mode 100644 index 0000000000..ddd9d1880d --- /dev/null +++ b/ports/qt5base/qt_release.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = C:/vcpkg/installed/x64-windows +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/qt5declarative/fixcmake.py b/ports/qt5declarative/fixcmake.py new file mode 100644 index 0000000000..d55ca77546 --- /dev/null +++ b/ports/qt5declarative/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +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") + for line in openedfile: + if "_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 exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index b6a24946bf..48ab900ce1 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -33,12 +33,53 @@ set(ENV{_CL_} "/utf-8") vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -vcpkg_configure_qmake( +vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - OPTIONS "CONFIG+=debug_and_release" ) -vcpkg_build_qmake() +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5declarative RENAME copyright) \ No newline at end of file diff --git a/ports/qt5doc/CONTROL b/ports/qt5doc/CONTROL deleted file mode 100644 index aef693586c..0000000000 --- a/ports/qt5doc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5doc -Version: 5.9.2-0 -Description: Qt5 Document Creation Module -Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5docs/CONTROL b/ports/qt5docs/CONTROL new file mode 100644 index 0000000000..32d85ef373 --- /dev/null +++ b/ports/qt5docs/CONTROL @@ -0,0 +1,4 @@ +Source: qt5docs +Version: 5.9.2-0 +Description: Qt5 Documentation +Build-Depends: qt5base, qt5tools \ No newline at end of file diff --git a/ports/qt5doc/portfile.cmake b/ports/qt5docs/portfile.cmake similarity index 91% rename from ports/qt5doc/portfile.cmake rename to ports/qt5docs/portfile.cmake index 9cacc81667..6b177dda17 100644 --- a/ports/qt5doc/portfile.cmake +++ b/ports/qt5docs/portfile.cmake @@ -31,14 +31,10 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -vcpkg_build_qmake_debug() - vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake_release() +vcpkg_build_qmake_release( + TARGETS docs +) diff --git a/ports/qt5tools/fixcmake.py b/ports/qt5tools/fixcmake.py new file mode 100644 index 0000000000..d55ca77546 --- /dev/null +++ b/ports/qt5tools/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +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") + for line in openedfile: + if "_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 exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 2a2e5cd4df..ebcdb6b12e 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -43,6 +43,21 @@ vcpkg_configure_qmake_release( vcpkg_build_qmake_release() +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) @@ -50,6 +65,23 @@ file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.ex file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) #touch an empty include file - qt tools does not create any and this is an error in vcpkg diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 800e3490bb..5d7b859095 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -43,14 +43,14 @@ vcpkg_configure_qmake_release( vcpkg_build_qmake_release() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake index 7e5625850a..a734e63cf2 100644 --- a/scripts/cmake/vcpkg_build_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -10,6 +10,7 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_debug) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used @@ -18,7 +19,7 @@ function(vcpkg_build_qmake_debug) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${JOM} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake index 6cfbcdc919..3daf9201be 100644 --- a/scripts/cmake/vcpkg_build_qmake_release.cmake +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -10,15 +10,16 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_release) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) - + # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${JOM} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) From 62b62d9f35cfb1e81971f56d4f33f369ed9af53c Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:02:26 +1100 Subject: [PATCH 7/8] minor clean up and configuration --- ports/qt5base/install_qt.cmake | 30 +++++++------- ports/qt5base/portfile.cmake | 5 +++ ports/qt5base/qt_debug.conf | 2 +- ports/qt5base/qt_release.conf | 2 +- ports/qt5docs/CONTROL | 4 -- ports/qt5docs/portfile.cmake | 40 ------------------- ports/qt5tools/portfile.cmake | 5 +-- .../cmake/vcpkg_configure_qmake_release.cmake | 1 - 8 files changed, 24 insertions(+), 65 deletions(-) delete mode 100644 ports/qt5docs/CONTROL delete mode 100644 ports/qt5docs/portfile.cmake diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake index 922303aba5..37528e4e65 100644 --- a/ports/qt5base/install_qt.cmake +++ b/ports/qt5base/install_qt.cmake @@ -13,6 +13,20 @@ function(install_qt) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + message(STATUS "Package ${TARGET_TRIPLET}-rel") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") vcpkg_execute_required_process( @@ -26,19 +40,7 @@ function(install_qt) LOGNAME package-${TARGET_TRIPLET}-rel ) message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) + set(ENV{PATH} "${_path}") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + endfunction() \ No newline at end of file diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 5368c3a4ae..623ff29c26 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -80,6 +80,11 @@ file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +set(QT_DEBUG_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) +set(QT_RELEASE_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/qt.conf) +configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/qt.conf) + vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf index 96e4a2a4dc..3bed4b725f 100644 --- a/ports/qt5base/qt_debug.conf +++ b/ports/qt5base/qt_debug.conf @@ -1,5 +1,5 @@ [Paths] -Prefix = C:/vcpkg/installed/x64-windows +Prefix = ${QT_DEBUG_PREFIX_PATH} Documentation = share/qt5/debug/doc Headers = share/qt5/debug/include Libraries = debug/lib diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf index ddd9d1880d..99356fc269 100644 --- a/ports/qt5base/qt_release.conf +++ b/ports/qt5base/qt_release.conf @@ -1,5 +1,5 @@ [Paths] -Prefix = C:/vcpkg/installed/x64-windows +Prefix = ${QT_RELEASE_PREFIX_PATH} Documentation = share/qt5/doc Headers = include Libraries = lib diff --git a/ports/qt5docs/CONTROL b/ports/qt5docs/CONTROL deleted file mode 100644 index 32d85ef373..0000000000 --- a/ports/qt5docs/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5docs -Version: 5.9.2-0 -Description: Qt5 Documentation -Build-Depends: qt5base, qt5tools \ No newline at end of file diff --git a/ports/qt5docs/portfile.cmake b/ports/qt5docs/portfile.cmake deleted file mode 100644 index 6b177dda17..0000000000 --- a/ports/qt5docs/portfile.cmake +++ /dev/null @@ -1,40 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtdoc-5.9.2") -set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -vcpkg_build_qmake_release( - TARGETS docs -) diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index ebcdb6b12e..84c00d0c8a 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -82,7 +82,4 @@ file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) - -#touch an empty include file - qt tools does not create any and this is an error in vcpkg -file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index 8ab5340e93..cf9eacbd5b 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -22,7 +22,6 @@ function(vcpkg_configure_qmake_release) # Find qmake exectuable find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) - if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() From ddc421acbc8bc9dd1d448190ac173b9d11e942dd Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:23:20 +1100 Subject: [PATCH 8/8] update descriptions --- ports/qt5base/CONTROL | 2 +- ports/qt5declarative/CONTROL | 2 +- ports/qt5tools/CONTROL | 2 +- ports/qt5winextras/CONTROL | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/qt5base/CONTROL b/ports/qt5base/CONTROL index 0b9e4792a8..79523a21f6 100644 --- a/ports/qt5base/CONTROL +++ b/ports/qt5base/CONTROL @@ -1,4 +1,4 @@ Source: qt5base Version: 5.9.2-0 -Description: Qt5 application framework base components. Webengine, examples and tests not included. +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 diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL index 67ffc3212f..cd86bb4136 100644 --- a/ports/qt5declarative/CONTROL +++ b/ports/qt5declarative/CONTROL @@ -1,4 +1,4 @@ Source: qt5declarative Version: 5.9.2-0 -Description: Qt5 Declarative (Quick 2) +Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL index 7bdb5c1dba..20c100ce97 100644 --- a/ports/qt5tools/CONTROL +++ b/ports/qt5tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5tools Version: 5.9.2-0 -Description: Qt5 tools +Description: Qt5 Tools Module. Includes deployment tools and helpers, Qt Designer, Assistant, and other applications Build-Depends: qt5base diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL index 67117a9fac..1c212d9b5d 100644 --- a/ports/qt5winextras/CONTROL +++ b/ports/qt5winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5winextras Version: 5.9.2-0 -Description: Qt5 Windows extras +Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. Build-Depends: qt5base, atlmfc \ No newline at end of file