From 37304b1d48b217b6827e7c50b2a81faaccc76666 Mon Sep 17 00:00:00 2001 From: Zhuo Zhang Date: Tue, 15 Aug 2023 23:18:45 +0800 Subject: [PATCH] [docs] Clean comments and prints when find vulkan --- src/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 87dc19616ad7..11b1fac764ad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -265,18 +265,17 @@ endif() if(NCNN_VULKAN) find_package(Vulkan QUIET) if(NOT Vulkan_FOUND) - message(STATUS "=== CMAKE_SYSTEM_NAME is: ${CMAKE_SYSTEM_NAME}") if(DEFINED ENV{VULKAN_SDK}) if(CMAKE_SYSTEM_NAME MATCHES "Linux") list(APPEND CMAKE_MODULE_PATH "$ENV{VULKAN_SDK}/../source/VulkanTools/cmake") elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") list(APPEND CMAKE_MODULE_PATH "$ENV{VULKAN_SDK}/Samples/cmake") elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") - message(WARNING "Failed to find vulkan since cmake too old\n" + message(WARNING "Failed to find vulkan since cmake is too old\n" "cmake >= 3.7 required. Consider `brew upgrade cmake`") endif() else() - message(FATAL_ERROR "!! CMake didn't find Vulkan. Please set VULKAN_SDK env var, e.g.:\n" + message(FATAL_ERROR "Error: CMake didn't find Vulkan. Please set VULKAN_SDK env var, e.g.:\n" "Linux: export VULKAN_SDK=~/soft/vulkansdk/1.2.148.0/x86_64\n" "Windows: set VULKAN_SDK=E:/lib/VulkanSDK/1.2.148.0\n" "MacOS: export VULKAN_SDK=~/soft/vulkansdk/1.2.148.0/macOS\n" @@ -296,7 +295,7 @@ if(NCNN_VULKAN) find_library(Metal NAMES Metal) find_library(IOKit NAMES IOKit) find_library(IOSurface NAMES IOSurface) - list(APPEND vulkan_dependec_LINK_LIBRARIES + list(APPEND vulkan_dependent_LINK_LIBRARIES ${Metal} ${IOKit} ${IOSurface} @@ -306,7 +305,7 @@ if(NCNN_VULKAN) ${Foundation} ${CoreFoundation} ) - target_link_libraries(ncnn PRIVATE ${vulkan_dependec_LINK_LIBRARIES}) + target_link_libraries(ncnn PRIVATE ${vulkan_dependent_LINK_LIBRARIES}) endif() target_include_directories(ncnn PRIVATE $) target_link_libraries(ncnn PRIVATE glslang SPIRV)