From bd572aa2f9996887244e62659a94992d07e67a19 Mon Sep 17 00:00:00 2001 From: wallbreaker2 <25576317+WallBreaker2@users.noreply.github.com> Date: Mon, 10 Jul 2023 20:24:20 +0800 Subject: [PATCH] add vcpkg_root env var error report --- qttool/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qttool/CMakeLists.txt b/qttool/CMakeLists.txt index 0742c70..e7a77dd 100644 --- a/qttool/CMakeLists.txt +++ b/qttool/CMakeLists.txt @@ -14,14 +14,17 @@ set(CMAKE_CXX_STANDARD 17) if(NOT $ENV{QT_ROOT} STREQUAL "") IF(CMAKE_SIZEOF_VOID_P EQUAL 8) set(CMAKE_PREFIX_PATH "$ENV{QT_ROOT}\\msvc2017_64") + + set(Qt5_DIR "$ENV{QT_ROOT}\\msvc2017_64") else() set(CMAKE_PREFIX_PATH "$ENV{QT_ROOT}\\msvc2017") + set(Qt5_DIR "$ENV{QT_ROOT}\\msvc2017") endif() else() message(ERROR "环境变量 QT_ROOT 未设置") endif() - + message(STATUS "环境变量 ${CMAKE_PREFIX_PATH}$") # find_package(Eigen3 CONFIG REQUIRED) find_package(Qt5 COMPONENTS Widgets REQUIRED) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -44,7 +47,7 @@ message(STATUS "USE USER VCPKG$ENV{VCPKG_ROOT}") include_directories("$ENV{VCPKG_ROOT}/installed/x86-windows/include") link_directories("$ENV{VCPKG_ROOT}/installed/x86-windows/lib") else() - message(ERROR "环境变量 QT_ROOT 未设置") + message(ERROR "环境变量 VCPKG_ROOT 未设置") endif() SET(SRC_FILES