diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-06-09 22:38:17 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-06-09 23:56:19 -0700 |
| commit | 13b29588ba5c1b89969a3bf2a5cc61a97e9c83a0 (patch) | |
| tree | 0284e431e88bfbc5ef55434b58fb5f17523e5a5d /scripts | |
| parent | 2e01b926d875f13eea368e123f5d3fe925b29bec (diff) | |
| download | vcpkg-13b29588ba5c1b89969a3bf2a5cc61a97e9c83a0.tar.gz vcpkg-13b29588ba5c1b89969a3bf2a5cc61a97e9c83a0.zip | |
[vcpkg-cmake] Add tools subdirectories to the find programs path. Improves #1143.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d3e1e814a..513c33ecb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,6 +1,5 @@ # Mark variables as used so cmake doesn't complain about them set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) - if(NOT VCPKG_TOOLCHAIN) if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) @@ -55,7 +54,6 @@ if(NOT VCPKG_TOOLCHAIN) endif() endwhile() set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) - set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) @@ -103,6 +101,12 @@ if(NOT VCPKG_TOOLCHAIN) ) set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) + file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) + foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + endif() + endforeach() option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) function(add_executable name) |
