aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-05-06 22:52:51 +0200
committerGitHub <noreply@github.com>2020-05-06 13:52:51 -0700
commit0bbf4400e977b2db20f5acda1522ba5ecae1d789 (patch)
treec977245b77403e57bd9ca9a317f62cb6921ce6e8 /scripts
parent9614c6a9624020b86168a58b1517b5ff24843903 (diff)
downloadvcpkg-0bbf4400e977b2db20f5acda1522ba5ecae1d789.tar.gz
vcpkg-0bbf4400e977b2db20f5acda1522ba5ecae1d789.zip
[vcpkg/scripts] Fix ninja search path on windows and find binaries within vcpkg first (#11105)
* [vcpkg/scripts] fix wrong paths variable on windows * [vcpkg/scripts] search within vcpkg first and then ask the rest of the world * [vcpkg/scripts] add second search path for ninja. First is for vcpkg fetch ninja Second is for vcpkg_find_acquire_program
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index e7a99cb55..5aa1cf440 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -176,7 +176,8 @@ function(vcpkg_find_acquire_program VAR)
set(PROGNAME ninja)
set(SUBDIR "ninja-1.10.0")
if(CMAKE_HOST_WIN32)
- set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}")
+ set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-windows")
+ list(APPEND PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}")
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx")
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
@@ -320,10 +321,12 @@ function(vcpkg_find_acquire_program VAR)
macro(do_find)
if(NOT DEFINED REQUIRED_INTERPRETER)
- find_program(${VAR} ${PROGNAME} PATHS ${PATHS})
+ find_program(${VAR} ${PROGNAME} PATHS ${PATHS} NO_DEFAULT_PATH)
+ find_program(${VAR} ${PROGNAME})
else()
vcpkg_find_acquire_program(${REQUIRED_INTERPRETER})
- find_file(SCRIPT_${VAR} ${SCRIPTNAME} PATHS ${PATHS})
+ find_file(SCRIPT_${VAR} ${SCRIPTNAME} PATHS ${PATHS} NO_DEFAULT_PATH)
+ find_file(SCRIPT_${VAR} ${SCRIPTNAME})
set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT_${VAR}})
endif()
endmacro()