aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_build_qmake.cmake4
-rw-r--r--scripts/cmake/vcpkg_build_qmake_debug.cmake29
-rw-r--r--scripts/cmake/vcpkg_build_qmake_release.cmake29
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake4
-rw-r--r--scripts/cmake/vcpkg_configure_qmake_debug.cmake41
-rw-r--r--scripts/cmake/vcpkg_configure_qmake_release.cmake43
6 files changed, 148 insertions, 2 deletions
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 <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() \ 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 <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() \ No newline at end of file