aboutsummaryrefslogtreecommitdiff
path: root/scripts/buildsystems
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-09-24 12:05:56 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-09-24 12:05:56 -0700
commitcdfa4ea1dfa682fe27d2484ba7a36c45c58f5501 (patch)
tree10f9ede7d87d91ce75b850b42f332d4ddf0a26a5 /scripts/buildsystems
parenta3629594300faae4ca3ccb914cbf74ffe7f40e14 (diff)
downloadvcpkg-cdfa4ea1dfa682fe27d2484ba7a36c45c58f5501.tar.gz
vcpkg-cdfa4ea1dfa682fe27d2484ba7a36c45c58f5501.zip
Reduce repetition of relative paths in vcpkg.cmake to reduce future errors
Diffstat (limited to 'scripts/buildsystems')
-rw-r--r--scripts/buildsystems/vcpkg.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index bae8cc3f8..10be855e5 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -22,19 +22,19 @@ if(NOT VCPKG_TOOLCHAIN)
endif()
set(_VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT})
-
+ set(_VCPKG_INSTALLED_DIR ${CMAKE_CURRENT_LIST_DIR}/../../installed)
set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
list(APPEND CMAKE_PREFIX_PATH
- ${CMAKE_CURRENT_LIST_DIR}/../../installed/${_VCPKG_TARGET_TRIPLET}/debug
+ ${_VCPKG_INSTALLED_DIR}/${_VCPKG_TARGET_TRIPLET}/debug
)
endif()
list(APPEND CMAKE_PREFIX_PATH
- ${CMAKE_CURRENT_LIST_DIR}/../../installed/${_VCPKG_TARGET_TRIPLET}
+ ${_VCPKG_INSTALLED_DIR}/${_VCPKG_TARGET_TRIPLET}
)
- include_directories(${CMAKE_CURRENT_LIST_DIR}/../installed/${_VCPKG_TARGET_TRIPLET}/include)
+ include_directories(${_VCPKG_INSTALLED_DIR}/${_VCPKG_TARGET_TRIPLET}/include)
option(OVERRIDE_ADD_EXECUTABLE "Automatically copy dependencies into the output directory for executables." ON)
if(OVERRIDE_ADD_EXECUTABLE)
@@ -43,7 +43,7 @@ if(NOT VCPKG_TOOLCHAIN)
add_custom_command(TARGET ${name} POST_BUILD
COMMAND powershell -executionpolicy UnRestricted -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
-targetBinary $<TARGET_FILE:${name}>
- -installedDir "${_VCPKG_TOOLCHAIN_DIR}/../../installed/${_VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
+ -installedDir "${_VCPKG_INSTALLED_DIR}/${_VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
-OutVariable out
)
endfunction()