File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,6 +244,19 @@ if(DEFINED ENV{MIXXX_VCPKG_ROOT} AND NOT DEFINED MIXXX_VCPKG_ROOT)
244244endif ()
245245
246246if (DEFINED MIXXX_VCPKG_ROOT)
247+ # Validate MIXXX_VCPKG_ROOT points to a vcpkg root to avoid confusing follow-up errors.
248+ set (_vcpkg_toolchain "${MIXXX_VCPKG_ROOT} /scripts/buildsystems/vcpkg.cmake" )
249+ if (NOT EXISTS "${_vcpkg_toolchain} " )
250+ file (TO_NATIVE_PATH "${_vcpkg_toolchain} " _vcpkg_toolchain_native )
251+ message (
252+ STATUS
253+ "MIXXX_VCPKG_ROOT was set to \" ${MIXXX_VCPKG_ROOT} \" , but this is not a valid vcpkg root.\n "
254+ "Expected to find: ${_vcpkg_toolchain_native} \n "
255+ "Please set MIXXX_VCPKG_ROOT to the vcpkg root directory, the folder containing the vcpkg tool (vcpkg.exe on Windows)."
256+ )
257+ fatal_error_missing_env ()
258+ endif ()
259+
247260 if (
248261 EXISTS "${MIXXX_VCPKG_ROOT} /overlay/ports"
249262 OR NOT EXISTS "${MIXXX_VCPKG_ROOT} /ports"
You can’t perform that action at this time.
0 commit comments