aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_configure_qmake.cmake
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2019-09-12 19:07:22 +0200
committerPhil Christensen <philc@microsoft.com>2019-09-12 10:07:21 -0700
commit96f4487c77fbf08518a9ee665612927c97ce8ebd (patch)
treea7b610226f798bda208a6459f26afa9922fb5dde /scripts/cmake/vcpkg_configure_qmake.cmake
parentecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea (diff)
downloadvcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.tar.gz
vcpkg-96f4487c77fbf08518a9ee665612927c97ce8ebd.zip
[Qt] Update to 5.12.4 (#7667)
* update to 5.12.4 * removed port qt5-modularscripts and split it functionality into more functions into qt5-base * added qt_port_hashes.cmake for simpler upgrade. * added optional VCPKG_QT_HOST_MKSPEC and VCPKG_QT_TARGET_MKSPEC to select QTs build mkspecs from a triplet * qt_<config>.conf are now copied from the build dir instead from the port dir * fixed freetype dependencies. * cleanup of vcpkg_qmake scripts. No strange/unclear replacements anymore. * introduced vcpkg_buildpath_length_warning * changed directory layout of the qt5 installation executables and mkspecs a bit.
Diffstat (limited to 'scripts/cmake/vcpkg_configure_qmake.cmake')
-rw-r--r--scripts/cmake/vcpkg_configure_qmake.cmake34
1 files changed, 25 insertions, 9 deletions
diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake
index d660fedd7..73f554a33 100644
--- a/scripts/cmake/vcpkg_configure_qmake.cmake
+++ b/scripts/cmake/vcpkg_configure_qmake.cmake
@@ -6,37 +6,53 @@
# ::
# vcpkg_configure_qmake(SOURCE_PATH <pro_file_path>
# [OPTIONS arg1 [arg2 ...]]
+# [OPTIONS_RELEASE arg1 [arg2 ...]]
+# [OPTIONS_DEBUG arg1 [arg2 ...]]
# )
#
# ``SOURCE_PATH``
# The path to the *.pro qmake project file.
-# ``OPTIONS``
+# ``OPTIONS[_RELEASE|_DEBUG]``
# The options passed to qmake.
function(vcpkg_configure_qmake)
- cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN})
-
+ cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN})
+
# Find qmake executable
- find_program(QMAKE_COMMAND NAMES qmake PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
+ set(_triplet_hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin)
+ find_program(QMAKE_COMMAND NAMES qmake PATHS ${VCPKG_QT_HOST_TOOLS_ROOT_DIR}/bin ${_triplet_hostbindir})
if(NOT QMAKE_COMMAND)
message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.")
endif()
- if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- list(APPEND _csc_OPTIONS CONFIG+=staticlib)
+ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "static")
+ list(APPEND _csc_OPTIONS "CONFIG-=shared")
+ list(APPEND _csc_OPTIONS "CONFIG*=static")
+ else()
+ list(APPEND _csc_OPTIONS "CONFIG-=static")
+ list(APPEND _csc_OPTIONS "CONFIG*=shared")
+ list(APPEND _csc_OPTIONS_DEBUG "CONFIG*=separate_debug_info")
endif()
-
+
+ if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_CRT_LINKAGE} STREQUAL "static")
+ list(APPEND _csc_OPTIONS "CONFIG*=static-runtime")
+ endif()
+
# Cleanup build directories
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
+ if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET)
+ set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET})
+ endif()
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf)
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} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf"
+ COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
LOGNAME config-${TARGET_TRIPLET}-rel
)
@@ -49,7 +65,7 @@ function(vcpkg_configure_qmake)
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} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf"
+ COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf"
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
LOGNAME config-${TARGET_TRIPLET}-dbg
)