static linkage and jom fixes

This commit is contained in:
Barath Kannan 2016-10-25 12:39:50 +11:00
parent 0af6ca8123
commit 8dbeacd5ad
3 changed files with 29 additions and 8 deletions

View File

@ -1,4 +1,4 @@
Source: qt5
Version: 5.7
Build-Depends:
Description: Qt5 base components.
Description: Qt5 application framework base components. Webengine, examples and tests not included.

View File

@ -1,7 +1,8 @@
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.7.0)
set(ENV{QMAKESPEC} win32-msvc2015)
set(OUTPUT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
set(ENV{QMAKESPEC} win32-msvc2015)
set(ENV{QTDIR} ${OUTPUT_PATH}/qtbase)
set(ENV{PATH} "${OUTPUT_PATH}/qtbase/bin;$ENV{PATH}")
@ -22,10 +23,16 @@ endif()
file(MAKE_DIRECTORY ${OUTPUT_PATH})
message(STATUS "Configuring ${TARGET_TRIPLET}")
#if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
# list(APPEND QT_RUNTIME_LINKAGE "-static")
# list(APPEND QT_RUNTIME_LINKAGE "-static-runtime")
#endif()
vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH}/configure.bat"
-confirm-license -opensource
-debug-and-release -force-debug-info
-debug-and-release -force-debug-info ${QT_RUNTIME_LINKAGE}
-nomake examples -nomake tests -skip webengine
-prefix "${CURRENT_PACKAGES_DIR}"
WORKING_DIRECTORY ${OUTPUT_PATH}
@ -92,6 +99,20 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.lib ${CURRENT_PACKAGES_
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Gamepad.prl ${CURRENT_PACKAGES_DIR}/lib/Qt5Gamepad.prl)
file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
foreach(BINARY ${BINARY_TOOLS})
execute_process(COMMAND dumpbin /PDBPATH ${BINARY}
COMMAND findstr PDB
OUTPUT_VARIABLE PDB_LINE
ERROR_QUIET
RESULT_VARIABLE error_code
)
if(NOT error_code AND PDB_LINE MATCHES "PDB file found at")
string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes
string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes
file(INSTALL ${PDB_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${PDB_PATH})
endif()
endforeach()
file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
FILE(REMOVE ${BINARY_TOOLS})

View File

@ -25,11 +25,11 @@ function(vcpkg_find_acquire_program VAR)
set(NOEXTRACT ON)
set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720)
elseif(VAR MATCHES "JOM")
set(PROGNAME jom)
set(PATHS ${DOWNLOADS}/tools/jom/jom-1.1.1)
set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip")
set(ARCHIVE "jom_1_1_1.zip")
set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720)
set(PROGNAME jom)
set(PATHS ${DOWNLOADS}/tools/jom)
set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip")
set(ARCHIVE "jom_1_1_1.zip")
set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()