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.
This commit is contained in:
Ryan Foster
2023-08-24 13:29:12 -04:00
parent 075f3c4020
commit 2bf0a800d3

View File

@@ -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")