diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d9a7fb562..4eba4b43e 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -362,16 +362,22 @@ if(NOT Z_VCPKG_ROOT_DIR) z_vcpkg_add_fatal_error("Could not find .vcpkg-root") endif() -if(NOT DEFINED _VCPKG_INSTALLED_DIR) - if(VCPKG_MANIFEST_MODE) - set(_VCPKG_INSTALLED_DIR "${CMAKE_BINARY_DIR}/vcpkg_installed") - else() - set(_VCPKG_INSTALLED_DIR "${Z_VCPKG_ROOT_DIR}/installed") - endif() -set(_VCPKG_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}" +if(DEFINED VCPKG_INSTALLED_DIR) + # do nothing +elseif(DEFINED _VCPKG_INSTALLED_DIR) + set(VCPKG_INSTALLED_DIR "${_VCPKG_INSTALLED_DIR}") +elseif(VCPKG_MANIFEST_MODE) + set(VCPKG_INSTALLED_DIR "${CMAKE_BINARY_DIR}/vcpkg_installed") +else() + set(VCPKG_INSTALLED_DIR "${Z_VCPKG_ROOT_DIR}/installed") +endif() + +set(VCPKG_INSTALLED_DIR "${VCPKG_INSTALLED_DIR}" + CACHE PATH + "The directory which contains the installed libraries for each triplet" FORCE) +set(_VCPKG_INSTALLED_DIR "${VCPKG_INSTALLED_DIR}" CACHE PATH "The directory which contains the installed libraries for each triplet" FORCE) -endif() if(CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. list(APPEND CMAKE_PREFIX_PATH |
