-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
64 lines (51 loc) · 1.86 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.13)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
#
# Project configuration
#
project("MyApp")
# CEF configuration
set_property(GLOBAL PROPERTY OS_FOLDERS ON)
set(CEF_VERSION "120.2.7+g4bc6a59+chromium-120.0.6099.234")
# Determine the platform
if(NOT DEFINED CEF_PLATFORM)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
if("${PROJECT_ARCH}" STREQUAL "arm64")
set(CEF_PLATFORM "macosarm64")
else()
set(CEF_PLATFORM "macosx64")
endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(CEF_PLATFORM "linux64")
else()
set(CEF_PLATFORM "linux32")
endif()
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(CEF_PLATFORM "windows64")
else()
set(CEF_PLATFORM "windows32")
endif()
endif()
endif()
# Add this project's cmake/ directory to the module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/app/cmake/cef")
# Download and extract the CEF binary distribution (executes DownloadCEF.cmake)
include(DownloadCEF)
downloadcef("${CEF_PLATFORM}" "${CEF_VERSION}" "${CMAKE_SOURCE_DIR}/temp/cef")
# Add the CEF binary distribution's cmake/ directory to the module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake")
# Load the CEF configuration (executes FindCEF.cmake)
find_package(CEF REQUIRED)
#
# Target configuration
#
# Include the libcef_dll_wrapper target (executes libcef_dll/CMakeLists.txt)
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
# Allow includes relative to the current source directory
include(${CMAKE_CURRENT_SOURCE_DIR}/app/cmake/shared/common.cmake)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/app/cmake/shared)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/app/cmake/main)
# Display configuration settings
print_cef_config()