From 459ac9f2e17340e10e3cb8a66f956c59541d5fdd Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 00:40:25 +1100 Subject: qt5tools package --- scripts/cmake/vcpkg_build_qmake.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 1c6358654..bee5da7c9 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -15,18 +15,17 @@ function(vcpkg_build_qmake) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used - set(ENV_LIB_BACKUP ENV{LIB}) - set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;$ENV{LIB}") + 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}") - vcpkg_execute_required_process_repeat( - COUNT 2 + vcpkg_execute_required_process( COMMAND ${JOM} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} LOGNAME package-${TARGET_TRIPLET} ) message(STATUS "Package ${TARGET_TRIPLET} done") - # Restore the original value of ENV{LIB} - set(ENV{LIB} ENV_LIB_BACKUP) + # Restore the original value of ENV{PATH} + set(ENV{PATH} ENV_PATH_BACKUP) endfunction() -- cgit v1.2.3 From 3ba22c17540fc761c4fb3410ccd75cecb0f1f8b5 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:04:16 +1100 Subject: working qt tools build --- scripts/cmake/vcpkg_build_qmake.cmake | 4 +-- scripts/cmake/vcpkg_build_qmake_debug.cmake | 29 +++++++++++++++ scripts/cmake/vcpkg_build_qmake_release.cmake | 29 +++++++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 4 +++ scripts/cmake/vcpkg_configure_qmake_debug.cmake | 41 +++++++++++++++++++++ scripts/cmake/vcpkg_configure_qmake_release.cmake | 43 +++++++++++++++++++++++ 6 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 scripts/cmake/vcpkg_build_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_build_qmake_release.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_release.cmake (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index bee5da7c9..693f7841e 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -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() diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake new file mode 100644 index 000000000..7e5625850 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -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() diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake new file mode 100644 index 000000000..6cfbcdc91 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -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() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e5813..5dabd446e 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -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) diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake new file mode 100644 index 000000000..0166973d2 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -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 +# [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() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake new file mode 100644 index 000000000..67bdbdfb0 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -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 +# [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() \ No newline at end of file -- cgit v1.2.3 From d28de4a13edca249086e3ccf8d34e92ecb10006d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:56:47 +1100 Subject: qt5winextras --- scripts/cmake/vcpkg_configure_qmake_debug.cmake | 3 +++ scripts/cmake/vcpkg_configure_qmake_release.cmake | 1 + 2 files changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake index 0166973d2..e3dfb0777 100644 --- a/scripts/cmake/vcpkg_configure_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -38,4 +38,7 @@ function(vcpkg_configure_qmake_debug) LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + unset(QMAKE_COMMAND) + unset(QMAKE_COMMAND PARENT_SCOPE) + unset(QMAKE_COMMAND CACHE) endfunction() \ 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 67bdbdfb0..8ab5340e9 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -38,6 +38,7 @@ function(vcpkg_configure_qmake_release) LOGNAME config-${TARGET_TRIPLET}-rel ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + unset(QMAKE_COMMAND) unset(QMAKE_COMMAND PARENT_SCOPE) unset(QMAKE_COMMAND CACHE) endfunction() \ No newline at end of file -- cgit v1.2.3 From c147fc78c919d6084e5f98a574484346d590f00d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 03:15:30 +1100 Subject: further fixes --- scripts/cmake/vcpkg_build_qmake_debug.cmake | 3 ++- scripts/cmake/vcpkg_build_qmake_release.cmake | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake index 7e5625850..a734e63cf 100644 --- a/scripts/cmake/vcpkg_build_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -10,6 +10,7 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_debug) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used @@ -18,7 +19,7 @@ function(vcpkg_build_qmake_debug) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${JOM} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake index 6cfbcdc91..3daf9201b 100644 --- a/scripts/cmake/vcpkg_build_qmake_release.cmake +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -10,15 +10,16 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_release) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) 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} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) -- cgit v1.2.3 From 62b62d9f35cfb1e81971f56d4f33f369ed9af53c Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:02:26 +1100 Subject: minor clean up and configuration --- scripts/cmake/vcpkg_configure_qmake_release.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index 8ab5340e9..cf9eacbd5 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() -- cgit v1.2.3