mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 04:19:07 +08:00
minor clean up and configuration
This commit is contained in:
parent
c147fc78c9
commit
62b62d9f35
@ -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()
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
[Paths]
|
||||
Prefix = C:/vcpkg/installed/x64-windows
|
||||
Prefix = ${QT_RELEASE_PREFIX_PATH}
|
||||
Documentation = share/qt5/doc
|
||||
Headers = include
|
||||
Libraries = lib
|
||||
|
@ -1,4 +0,0 @@
|
||||
Source: qt5docs
|
||||
Version: 5.9.2-0
|
||||
Description: Qt5 Documentation
|
||||
Build-Depends: qt5base, qt5tools
|
@ -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
|
||||
)
|
@ -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)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright)
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user