aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-20 16:10:45 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-03-20 16:20:02 -0700
commitfded520642292b1d9ef1fced1c9c556d5d90e6d4 (patch)
treef384af292de32a967689f104a7c8f29911238e08 /scripts
parentf17fd50a6211eb6df7a4b1665e99aeddf20f2501 (diff)
downloadvcpkg-fded520642292b1d9ef1fced1c9c556d5d90e6d4.tar.gz
vcpkg-fded520642292b1d9ef1fced1c9c556d5d90e6d4.zip
[vcpkg-qmake] Tidy qmake-based builds. Search for qmake.exe inside tools.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_build_qmake.cmake6
-rw-r--r--scripts/cmake/vcpkg_configure_qmake.cmake10
-rw-r--r--scripts/cmake/vcpkg_execute_required_process_repeat.cmake7
3 files changed, 10 insertions, 13 deletions
diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake
index 263200423..1c6358654 100644
--- a/scripts/cmake/vcpkg_build_qmake.cmake
+++ b/scripts/cmake/vcpkg_build_qmake.cmake
@@ -12,11 +12,7 @@
# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html
function(vcpkg_build_qmake)
- vcpkg_find_acquire_program("JOM")
-
- if(NOT JOM)
- BUILD_ERROR("vcpkg_install_qmake: impossible to find jom.")
- endif()
+ vcpkg_find_acquire_program(JOM)
# Make sure that the linker finds the libraries used
set(ENV_LIB_BACKUP ENV{LIB})
diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake
index f51a2f4fb..037197e48 100644
--- a/scripts/cmake/vcpkg_configure_qmake.cmake
+++ b/scripts/cmake/vcpkg_configure_qmake.cmake
@@ -5,7 +5,7 @@
# It is assume that the qmake project CONFIG variable is
# "debug_and_release" (the default value on Windows, see [1]).
# Using this option, only one Makefile for building both Release and Debug
-# libraries is generated, that then can be run using the vcpkg_install_qmake
+# libraries is generated, that then can be run using the vcpkg_build_qmake
# command.
#
# ::
@@ -13,7 +13,7 @@
# [OPTIONS arg1 [arg2 ...]]
# )
#
-# ``PROJECT_PATH``
+# ``SOURCE_PATH``
# The path to the *.pro qmake project file.
# ``OPTIONS``
# The options passed to qmake.
@@ -24,10 +24,10 @@ function(vcpkg_configure_qmake)
cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN})
# Find qmake exectuable
- find_program(QMAKE_COMMAND NAMES qmake)
+ find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
if(NOT QMAKE_COMMAND)
- BUILD_ERROR("vcpkg_configure_qmake: impossible to find qmake.")
+ message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.")
endif()
# Cleanup build directories
@@ -36,7 +36,7 @@ function(vcpkg_configure_qmake)
message(STATUS "Configuring ${TARGET_TRIPLET}")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
vcpkg_execute_required_process(
- COMMAND ${QMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS}
+ COMMAND ${QMAKE_COMMAND} ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH}
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}
LOGNAME config-${TARGET_TRIPLET}
)
diff --git a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake
index d6fba132d..0c77c3913 100644
--- a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake
+++ b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake
@@ -2,11 +2,12 @@
function(vcpkg_execute_required_process_repeat)
cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN})
#debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})")
+ set(SUCCESSFUL_EXECUTION FALSE)
foreach(loop_count RANGE ${vcpkg_execute_required_process_repeat_COUNT})
execute_process(
COMMAND ${vcpkg_execute_required_process_repeat_COMMAND}
- OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out.log
- ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err.log
+ OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out-${loop_count}.log
+ ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err-${loop_count}.log
RESULT_VARIABLE error_code
WORKING_DIRECTORY ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY})
#debug_message("error_code=${error_code}")
@@ -16,7 +17,7 @@ function(vcpkg_execute_required_process_repeat)
break()
endif()
endforeach(loop_count)
- if (NOT ${SUCCESSFUL_EXECUTION})
+ if (NOT SUCCESSFUL_EXECUTION)
message(FATAL_ERROR
" Command failed: ${vcpkg_execute_required_process_repeat_COMMAND}\n"
" Working Directory: ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}\n"