aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_acquire_depot_tools.cmake2
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake2
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake11
3 files changed, 9 insertions, 6 deletions
diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake
index 1cc375725..009ba40f1 100644
--- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake
+++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake
@@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT)
set(download_success 1)
endif()
- if (NOT ${download_success})
+ if (NOT download_success)
message(FATAL_ERROR
"\n"
" Failed to download file.\n"
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 006570195..b8acfc823 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR)
endif()
endforeach(url)
- if (NOT ${download_success})
+ if (NOT download_success)
message(FATAL_ERROR
"\n"
" Failed to download file.\n"
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index 3c6dfae08..8d167e1c2 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -34,7 +34,8 @@
## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake)
## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake)
function(vcpkg_find_acquire_program VAR)
- if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND")
+ set(EXPANDED_VAR ${${VAR}})
+ if(EXPANDED_VAR)
return()
endif()
@@ -153,7 +154,8 @@ function(vcpkg_find_acquire_program VAR)
macro(do_find)
if(NOT DEFINED REQUIRED_INTERPRETER)
- find_program(${VAR} ${PROGNAME} PATHS ${PATHS})
+ find_program(FOUND_PROG ${PROGNAME} PATHS ${PATHS})
+ set(${VAR} ${FOUND_PROG})
else()
vcpkg_find_acquire_program(${REQUIRED_INTERPRETER})
find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS})
@@ -162,7 +164,8 @@ function(vcpkg_find_acquire_program VAR)
endmacro()
do_find()
- if(${VAR} MATCHES "-NOTFOUND")
+ set(FOUND_PROG ${${VAR}})
+ if(FOUND_PROG MATCHES "-NOTFOUND")
file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}
EXPECTED_HASH SHA512=${HASH}
SHOW_PROGRESS
@@ -173,7 +176,7 @@ function(vcpkg_find_acquire_program VAR)
else()
get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT)
string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION)
- if(${ARCHIVE_EXTENSION} STREQUAL ".msi")
+ if(ARCHIVE_EXTENSION STREQUAL ".msi")
file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH)
file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH)
execute_process(