Browse Source

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.
Ryan Foster 2 years ago
parent
commit
2bf0a800d3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      cmake/finders/FindCEF.cmake

+ 1 - 0
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")