• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
2# reserved. Use of this source code is governed by a BSD-style license that
3# can be found in the LICENSE file.
4
5#
6# This file is the CEF CMake configuration entry point and should be loaded
7# using `find_package(CEF REQUIRED)`. See the top-level CMakeLists.txt file
8# included with the CEF binary distribution for usage information.
9#
10
11# Find the CEF binary distribution root directory.
12set(_CEF_ROOT "")
13if(CEF_ROOT AND IS_DIRECTORY "${CEF_ROOT}")
14  set(_CEF_ROOT "${CEF_ROOT}")
15  set(_CEF_ROOT_EXPLICIT 1)
16else()
17  set(_ENV_CEF_ROOT "")
18  if(DEFINED ENV{CEF_ROOT})
19    file(TO_CMAKE_PATH "$ENV{CEF_ROOT}" _ENV_CEF_ROOT)
20  endif()
21  if(_ENV_CEF_ROOT AND IS_DIRECTORY "${_ENV_CEF_ROOT}")
22    set(_CEF_ROOT "${_ENV_CEF_ROOT}")
23    set(_CEF_ROOT_EXPLICIT 1)
24  endif()
25  unset(_ENV_CEF_ROOT)
26endif()
27
28if(NOT DEFINED _CEF_ROOT_EXPLICIT)
29  message(FATAL_ERROR "Must specify a CEF_ROOT value via CMake or environment variable.")
30endif()
31
32if(NOT IS_DIRECTORY "${_CEF_ROOT}/cmake")
33  message(FATAL_ERROR "No CMake bootstrap found for CEF binary distribution at: ${CEF_ROOT}.")
34endif()
35
36# Execute additional cmake files from the CEF binary distribution.
37set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CEF_ROOT}/cmake")
38include("cef_variables")
39include("cef_macros")
40