working qt tools build

This commit is contained in:
Barath Kannan 2017-10-16 23:04:16 +11:00
parent 890a81bebc
commit 3ba22c1754
16 changed files with 378 additions and 31 deletions

View File

@ -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}

View File

@ -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 +=

View File

@ -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)

View File

@ -0,0 +1,4 @@
Source: qt5declarative
Version: 5.9.2-0
Description: Qt5 Declarative (Quick 2)
Build-Depends: qt5base

View File

@ -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()

4
ports/qt5doc/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: qt5doc
Version: 5.9.2-0
Description: Qt5 Document Creation Module
Build-Depends: qt5base

View File

@ -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()

View File

@ -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)

View File

@ -0,0 +1,4 @@
Source: qt5winextras
Version: 5.9.2-0
Description: Qt5 Windows extras
Build-Depends: qt5base, atlmfc

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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)

View File

@ -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 <pro_file_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()

View File

@ -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 <pro_file_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()