message("${Y}==== 进入find_vcpkg.cmake ====${E}")

set(USE_VCPKG OFF)
if (DEFINED PATH_VCPKG AND NOT "${PATH_VCPKG}" STREQUAL "")
    file(TO_CMAKE_PATH ${PATH_VCPKG} PATH_VCPKG)
    set(_VCMAKE_PATH ${PATH_VCPKG}/scripts/buildsystems/vcpkg.cmake)
    if (EXISTS ${_VCMAKE_PATH})
        message("找到VCPKG,将启用VCPKG")
        list(APPEND CMAKE_TOOLCHAIN_FILE ${_VCMAKE_PATH})
        list(APPEND CMAKE_PREFIX_PATH "${PATH_VCPKG}/installed/x64-windows")
        set(USE_VCPKG ON)
    else ()
        message("VCPKG的路径错误,将不启用VCPKG")
    endif ()
else ()
    message("未设置PATH_VCPKG,将不启用VCPKG")
endif ()

