From 62b62d9f35cfb1e81971f56d4f33f369ed9af53c Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:02:26 +1100 Subject: [PATCH] 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()