Fixes/Refactorings to CMakeLists.txt

This commit is contained in:
Stephen Seo 2023-03-31 18:55:36 +09:00
parent ecd65fc42b
commit 7041f732a9

View file

@ -18,12 +18,14 @@ if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE)
endif() endif()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
if(NOT DEFINED DISABLE_OPENCL) if(NOT DEFINED DISABLE_OPENCL OR NOT DISABLE_OPENCL)
find_package(OpenCL QUIET) find_package(OpenCL)
if(NOT DEFINED OpenCL_FOUND) if(NOT DEFINED OpenCL_FOUND)
set(DISABLE_OPENCL True) set(DISABLE_OPENCL True)
message(WARNING "OpenCL not found, OpenCL usage is disabled.") message(WARNING "OpenCL not found, OpenCL usage is disabled.")
endif() endif()
else()
message(STATUS "Not checking for OpenCL")
endif() endif()
find_package(PNG REQUIRED) find_package(PNG REQUIRED)