mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[vcpkg.cmake] check for vcpkg.json only in ${CMAKE_SOURCE_DIR}
(#12523)
This commit is contained in:
parent
de0501f187
commit
b919cf7f7c
@ -23,7 +23,13 @@ function(_vcpkg_get_directory_name_of_file_above OUT DIRECTORY FILENAME)
|
||||
set(${OUT} ${_vcpkg_get_dir_out} CACHE INTERNAL "_vcpkg_get_directory_name_of_file_above: ${OUT}")
|
||||
endfunction()
|
||||
|
||||
_vcpkg_get_directory_name_of_file_above(_VCPKG_MANIFEST_DIR ${CMAKE_CURRENT_SOURCE_DIR} "vcpkg.json")
|
||||
if(NOT DEFINED VCPKG_MANIFEST_DIR)
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json")
|
||||
set(_VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}/vcpkg.json")
|
||||
endif()
|
||||
else()
|
||||
set(_VCPKG_MANIFEST_DIR ${VCPKG_MANIFEST_DIR})
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_MANIFEST_MODE)
|
||||
if(_VCPKG_MANIFEST_DIR)
|
||||
set(VCPKG_MANIFEST_MODE ON)
|
||||
|
Loading…
x
Reference in New Issue
Block a user