From 2bf0a800d3f9bb780d22dafea9da0444877dc3a6 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Thu, 24 Aug 2023 13:29:12 -0400 Subject: [PATCH] cmake: Restrict FindCEF path to omit default paths on Windows On Windows, if CEF libraries were present in default paths, they would be picked up in this find_program call, and it could later cause a build failure in the CMake custom copy commands on install if the components we are trying to copy do not exist. I recently ran into this after installing Intel PresentMon, which included CEF components, and was picked up by this find_program call. Let's apply NO_DEFAULT_PATH here the same as the find_library calls in this finder. --- cmake/finders/FindCEF.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/finders/FindCEF.cmake b/cmake/finders/FindCEF.cmake index ced4d4b6e..8543d8283 100644 --- a/cmake/finders/FindCEF.cmake +++ b/cmake/finders/FindCEF.cmake @@ -98,6 +98,7 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows) find_program( CEF_LIBRARY_RELEASE NAMES cef.dll libcef.dll + NO_DEFAULT_PATH PATHS "${CEF_ROOT_DIR}" "${CEF_ROOT_DIR}/Release" DOC "Chromium Embedded Framework library location")