Skip to content

Commit ba3547c

Browse files
committed
maybe this works
1 parent 09fecca commit ba3547c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ function pre_build {
3939
brew info ffmpeg
4040
echo '-----------------'
4141

42-
MACOS_SDK_PATH=`xcrun --sdk macosx --show-sdk-path`
43-
export CXXFLAGS="-stdlib=libc++ -isysroot ${MACOS_SDK_PATH} -mmacosx-version-min=10.7"
42+
export MACOS_SDK_PATH=`xcrun --sdk macosx --show-sdk-path`
43+
export MIN_MACOS_VERSION="10.7"
4444

4545
else
4646
echo "Running for linux"

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,13 @@ def main():
133133
"-DJPEG_LIBRARY=%s" % os.environ['JPEG_LIBRARY']
134134
]
135135

136-
# Turn off broken components
136+
# Fixes for macOS builds
137137
if sys.platform == 'darwin':
138138
cmake_args.append("-DWITH_LAPACK=OFF") # Some OSX LAPACK fns are incompatible, see
139139
# https://github.com/skvark/opencv-python/issues/21
140+
cmake_args.append("-DCMAKE_CXX_FLAGS=-stdlib=libc++")
141+
cmake_args.append("-DCMAKE_OSX_SYSROOT=%s" % os.environ['MACOS_SDK_PATH'])
142+
cmake_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET=%s" % os.environ['MIN_MACOS_VERSION'])
140143

141144
if sys.platform.startswith('linux'):
142145
cmake_args.append("-DWITH_IPP=OFF") # https://github.com/opencv/opencv/issues/10411

0 commit comments

Comments
 (0)