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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 8d5a97777..239eaa1dd 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -401,6 +401,6 @@ function(add_archiver_options target buildDir completeStatic)
get_target_property(cmakeTarget ${target} CMAKE_TARGET)
set(objects_out "${buildDir}/${cmakeTarget}_objects.o")
add_library(GnObject_${cmakeTarget}_${config} OBJECT IMPORTED GLOBAL)
- target_link_libraries(${cmakeTarget} PRIVATE $<$<CONFIG:${config}>:GnObject_${cmakeTarget}_${config}>)
+ target_link_libraries(${cmakeTarget} PRIVATE $<BUILD_LOCAL_INTERFACE:$<$<CONFIG:${config}>:GnObject_${cmakeTarget}_${config}>>)
set_property(TARGET GnObject_${cmakeTarget}_${config} PROPERTY IMPORTED_OBJECTS_${cfg} ${objects_out})
endfunction()
diff --git a/cmake/QtToolchainHelpers.cmake b/cmake/QtToolchainHelpers.cmake
index 8d5a97777..239eaa1dd 100644
--- a/cmake/QtToolchainHelpers.cmake
+++ b/cmake/QtToolchainHelpers.cmake
@@ -389,6 +389,10 @@ macro(append_compiler_linker_sdk_setup)
use_libcxx=true
)
_qt_internal_get_apple_sdk_version(apple_sdk_version)
+ list(APPEND gnArgArg
+ CMAKE_OSX_SYSROOT="${CMAKE_OSX_SYSROOT}"
+ apple_sdk_version="${apple_sdk_version}"
+ )
if (apple_sdk_version LESS 13.2)
list(APPEND gnArgArg
use_sck=false
diff --git a/src/3rdparty/chromium/build/config/apple/sdk_info.py b/src/3rdparty/chromium/build/config/apple/sdk_info.py
index 81b06d438..03af4f2db 100755
--- a/src/3rdparty/chromium/build/config/apple/sdk_info.py
+++ b/src/3rdparty/chromium/build/config/apple/sdk_info.py
@@ -59,8 +59,11 @@ def FillXcodeVersion(settings, developer_dir):
settings['xcode_build'] = version_plist['ProductBuildVersion']
return
- lines = subprocess.check_output(['xcodebuild',
+ try:
+ lines = subprocess.check_output(['xcodebuild',
'-version']).decode('UTF-8').splitlines()
+ except:
+ lines = [ 'Required: 12', 'Actual: unknown' ]
settings['xcode_version'] = FormatVersion(lines[0].split()[-1])
settings['xcode_version_int'] = int(settings['xcode_version'], 10)
settings['xcode_build'] = lines[-1].split()[-1]
@@ -86,10 +89,13 @@ def FillSDKPathAndVersion(settings, platform, xcode_version):
settings['sdk_build'] = subprocess.check_output(
['xcrun', '-sdk', platform,
'--show-sdk-build-version']).decode('UTF-8').strip()
- settings['toolchains_path'] = os.path.join(
+ try:
+ settings['toolchains_path'] = os.path.join(
subprocess.check_output(['xcode-select',
'-print-path']).decode('UTF-8').strip(),
'Toolchains/XcodeDefault.xctoolchain')
+ except:
+ settings['toolchains_path'] = ''
def CreateXcodeSymlinkAt(src, dst, root_build_dir):
diff --git a/src/3rdparty/chromium/build/config/mac/mac_sdk.gni b/src/3rdparty/chromium/build/config/mac/mac_sdk.gni
index 00588459e..48b4a0102 100644
--- a/src/3rdparty/chromium/build/config/mac/mac_sdk.gni
+++ b/src/3rdparty/chromium/build/config/mac/mac_sdk.gni
@@ -15,6 +15,8 @@ assert(
assert(current_os == "mac" || current_os == "android" || current_toolchain == default_toolchain)
declare_args() {
+ apple_sdk_version = ""
+ CMAKE_OSX_SYSROOT = ""
# The following two variables control the minimum supported version for
# macOS:
#
@@ -115,6 +117,7 @@ if (mac_sdk_path == "" && use_system_xcode &&
}
if (use_system_xcode) {
+ if (CMAKE_OSX_SYSROOT == "") {
# The tool will print the SDK path on the first line, and the version on the
# second line.
find_sdk_args = [
@@ -133,6 +136,12 @@ if (use_system_xcode) {
} else {
mac_bin_path = find_sdk_lines[1]
}
+ } else {
+ mac_sdk_version = apple_sdk_version
+ mac_sdk_build_version = ""
+ mac_sdk_path = CMAKE_OSX_SYSROOT
+ mac_bin_path = ""
+ }
} else {
mac_sdk_version = mac_sdk_official_version
mac_sdk_build_version = mac_sdk_official_build_version
|