From 7041f732a9e78f918c66c9e21d815de0b9dff3d8 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 31 Mar 2023 18:55:36 +0900 Subject: [PATCH] Fixes/Refactorings to CMakeLists.txt --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63df9d1..75a1747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,12 +18,14 @@ if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE) endif() find_package(Threads REQUIRED) -if(NOT DEFINED DISABLE_OPENCL) - find_package(OpenCL QUIET) +if(NOT DEFINED DISABLE_OPENCL OR NOT DISABLE_OPENCL) + find_package(OpenCL) if(NOT DEFINED OpenCL_FOUND) set(DISABLE_OPENCL True) message(WARNING "OpenCL not found, OpenCL usage is disabled.") endif() +else() + message(STATUS "Not checking for OpenCL") endif() find_package(PNG REQUIRED)