From 0735af9fdfdec53ca8c2258ef253c5ee0879d2ea Mon Sep 17 00:00:00 2001 From: Yihong Wu <54519668+domosekai@users.noreply.github.com> Date: Fri, 29 Apr 2022 18:03:39 +0800 Subject: [PATCH] Warn user if vcpkg is not integrated with VS --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc0845ec..06204010 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,10 @@ if(EXISTS "${TOP_DIRECTORY}/.git" AND NOT EXISTS "${TOP_DIRECTORY}/src/libhamcor message (FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive") endif() +if(WIN32 AND VCPKG_TARGET_TRIPLET AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) + message (FATAL_ERROR "vcpkg not installed or integrated with Visual Studio. Install it and run\n\tvcpkg integrate install") +endif() + if(UNIX) include(GNUInstallDirs)