Skip to content

Commit 078e84e

Browse files
committed
get the developer directory using xcode-select -p #14
1 parent a798d6b commit 078e84e

File tree

10 files changed

+68
-56
lines changed

10 files changed

+68
-56
lines changed

configs/meson-crossfiles/arm64-ios-simulator.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ strip = 'strip'
1111
pkgconfig = 'pkg-config'
1212

1313
[built-in options]
14-
c_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
15-
cpp_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
16-
c_link_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
17-
cpp_link_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
18-
objc_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
19-
objcpp_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
14+
c_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
15+
cpp_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
16+
c_link_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
17+
cpp_link_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
18+
objc_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
19+
objcpp_args = ['-arch', 'arm64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
2020

2121
[properties]
22-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer'
22+
root = '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer'
2323
has_function_printf = true
2424
has_function_hfkerhisadf = false
2525
has_function_posix_memalign = true

configs/meson-crossfiles/arm64-ios.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ strip = 'strip'
1010
pkgconfig = 'pkg-config'
1111

1212
[built-in options]
13-
c_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
14-
cpp_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
15-
c_link_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
16-
cpp_link_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
17-
objc_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
18-
objcpp_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
13+
c_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
14+
cpp_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
15+
c_link_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
16+
cpp_link_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
17+
objc_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
18+
objcpp_args = ['-arch', 'arm64', '-miphoneos-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/iPhoneOS.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/arm64-macos.meson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ objc_args = ['-arch', 'arm64', '-mmacosx-version-min=10.11', '-Os']
1818
objcpp_args = ['-arch', 'arm64', '-mmacosx-version-min=10.11', '-Os']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/MacOSX.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/arm64-tvos-simulator.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ strip = 'strip'
1010
pkgconfig = 'pkg-config'
1111

1212
[built-in options]
13-
c_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
14-
cpp_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
15-
c_link_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
16-
cpp_link_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
17-
objc_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
18-
objcpp_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
13+
c_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
14+
cpp_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
15+
c_link_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
16+
cpp_link_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
17+
objc_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
18+
objcpp_args = ['-arch', 'arm64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/arm64-tvos.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ strip = 'strip'
1010
pkgconfig = 'pkg-config'
1111

1212
[built-in options]
13-
c_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
14-
cpp_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
15-
c_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
16-
cpp_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
17-
objc_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
18-
objcpp_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
13+
c_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
14+
cpp_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
15+
c_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
16+
cpp_link_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
17+
objc_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
18+
objcpp_args = ['-arch', 'arm64', '-mtvos-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/AppleTVOS.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/x86_64-ios-simulator.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ strip = 'strip'
1010
pkgconfig = 'pkg-config'
1111

1212
[built-in options]
13-
c_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
14-
cpp_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
15-
c_link_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
16-
cpp_link_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
17-
objc_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
18-
objcpp_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
13+
c_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
14+
cpp_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
15+
c_link_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
16+
cpp_link_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
17+
objc_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
18+
objcpp_args = ['-arch', 'x86_64', '-mios-simulator-version-min=9.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/iPhoneSimulator.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/x86_64-macos.meson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ objc_args = ['-arch', 'x86_64', '-mmacosx-version-min=10.11', '-Os']
1818
objcpp_args = ['-arch', 'x86_64', '-mmacosx-version-min=10.11', '-Os']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/MacOSX.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

configs/meson-crossfiles/x86_64-tvos-simulator.meson

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ strip = 'strip'
1010
pkgconfig = 'pkg-config'
1111

1212
[built-in options]
13-
c_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
14-
cpp_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
15-
c_link_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
16-
cpp_link_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
17-
objc_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
18-
objcpp_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
13+
c_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
14+
cpp_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
15+
c_link_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
16+
cpp_link_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
17+
objc_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
18+
objcpp_args = ['-arch', 'x86_64', '-mtvos-simulator-version-min=12.0', '-Os', '-isysroot', '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk']
1919

2020
[properties]
21-
root = '/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer'
21+
root = '__XCODE_DEVELOPER/Platforms/AppleTVSimulator.platform/Developer'
2222
has_function_printf = true
2323
has_function_hfkerhisadf = false
2424
has_function_posix_memalign = true

do-compile/apple/meson-compatible.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,27 @@ fi
3939
export CC="$MR_CC"
4040
export CXX="$MR_CXX"
4141

42+
cd $MR_BUILD_SOURCE
43+
build=./meson_wksp
44+
rm -rf $build
45+
mkdir -p $build
46+
47+
cross_file=
4248
if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]]; then
4349
if [[ $MR_IS_SIMULATOR == 1 ]]; then
44-
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH simulator."
45-
CFG_FLAGS="$CFG_FLAGS --cross-file $MR_SHELL_CONFIGS_DIR/meson-crossfiles/$MR_ARCH-$MR_PLAT-simulator.meson"
50+
raw_cross_file="$MR_SHELL_CONFIGS_DIR/meson-crossfiles/$MR_ARCH-$MR_PLAT-simulator.meson"
4651
else
47-
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
48-
CFG_FLAGS="$CFG_FLAGS --cross-file $MR_SHELL_CONFIGS_DIR/meson-crossfiles/$MR_ARCH-$MR_PLAT.meson"
52+
raw_cross_file="$MR_SHELL_CONFIGS_DIR/meson-crossfiles/$MR_ARCH-$MR_PLAT.meson"
4953
fi
54+
55+
cross_file=$build/meson-crossfile.meson
56+
touch "$cross_file"
57+
cat "$raw_cross_file" > "$cross_file"
58+
59+
my_sed_i "s|__XCODE_DEVELOPER|$MR_XCODE_DEVELOPER|" "$cross_file"
60+
61+
echo "[*] using cross compile, cross file: $cross_file"
62+
CFG_FLAGS="$CFG_FLAGS --cross-file $cross_file"
5063
fi
5164

5265
CFG_FLAGS="$CFG_FLAGS $MESON_OTHER_FLAGS"
@@ -58,10 +71,6 @@ echo "CFG_FLAGS: $CFG_FLAGS"
5871
echo "----------------------"
5972
echo
6073

61-
cd $MR_BUILD_SOURCE
62-
build=./meson_wksp
63-
rm -rf $build
64-
6574
meson setup $build $CFG_FLAGS
6675

6776
cd $build

tools/export-apple-build-env.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,26 @@
1616
#
1717
#https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script
1818

19-
XCRUN_DEVELOPER=`xcode-select -print-path`
20-
if [ ! -d "$XCRUN_DEVELOPER" ]; then
21-
echo "xcode path is not set correctly $XCRUN_DEVELOPER does not exist (most likely because of xcode > 4.3)"
19+
XCODE_DEVELOPER=`xcode-select -print-path`
20+
if [ ! -d "$XCODE_DEVELOPER" ]; then
21+
echo "xcode path is not set correctly $XCODE_DEVELOPER does not exist (most likely because of xcode > 4.3)"
2222
echo "run"
2323
echo "sudo xcode-select -switch <xcode path>"
2424
echo "for default installation:"
2525
echo "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer"
2626
exit 1
2727
fi
2828

29-
case $XCRUN_DEVELOPER in
29+
case $XCODE_DEVELOPER in
3030
*\ * )
3131
echo "Your Xcode path contains whitespaces, which is not supported."
3232
exit 1
3333
;;
3434
esac
3535

36+
# /Applications/Xcode.app/Contents/Developer
37+
export MR_XCODE_DEVELOPER="$XCODE_DEVELOPER"
38+
3639
echo $(xcodebuild -version)
3740

3841
if [[ "$MR_PLAT" == 'ios' ]]; then

0 commit comments

Comments
 (0)