This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
/
config.cmake
68 lines (58 loc) · 1.59 KB
/
config.cmake
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
65
66
67
68
#
# Build environment configuration file for QCefView
#
#################################################################################
#
# The Qt SDK path
#
set(QT_SDK_DIR
# Change this value to the Qt SDK path of your build environment
"$ENV{QTDIR}"
)
#
# For CI system
#
if (DEFINED ENV{APPVEYOR})
set(QT_SDK_DIR
# Change this value to the Qt SDK path of your build environment
"C:\\Qt\\5.15.2\\msvc2019_64"
)
endif()
#
# The link for downloading the CEF binary sdk
#
set(CEF_SDK_URL
# Change this value to swith between different CEF versions.
"https://cef-builds.spotifycdn.com/cef_binary_89.0.12%2Bg2b76680%2Bchromium-89.0.4389.90_windows64.tar.bz2"
)
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Usually, there is NO NEED to modify the following config
#
# Download CEF binary package
#
set (CEF_SDK_PACKAGE "${CMAKE_CURRENT_SOURCE_DIR}/dep/cef_package.tar.bz2")
if(NOT EXISTS "${CEF_SDK_PACKAGE}")
file(DOWNLOAD
"${CEF_SDK_URL}" # URL
"${CEF_SDK_PACKAGE}" # Local Path
SHOW_PROGRESS
TLS_VERIFY ON)
endif()
#
# Extact the CEF SDK dir
#
file(GLOB CEF_SDK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dep/cef_binary_*")
#
# Extract CEF binary package
#
if (NOT EXISTS ${CEF_SDK_DIR})
message(STATUS "CEF SDK dir does not exist, extracting new one....")
# Extract
file(ARCHIVE_EXTRACT
INPUT "${CEF_SDK_PACKAGE}"
DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/dep")
# Capture the dir name
file(GLOB CEF_SDK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dep/cef_binary_*")
endif()
# output
message(STATUS "CEF SDK dir: ${CEF_SDK_DIR}")