File tree 2 files changed +6
-3
lines changed
Filter options
2 files changed +6
-3
lines changed
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ function pre_build {
39
39
brew info ffmpeg
40
40
echo ' -----------------'
41
41
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"
44
44
45
45
else
46
46
echo " Running for linux"
Original file line number Diff line number Diff line change @@ -133,10 +133,13 @@ def main():
133
133
"-DJPEG_LIBRARY=%s" % os .environ ['JPEG_LIBRARY' ]
134
134
]
135
135
136
- # Turn off broken components
136
+ # Fixes for macOS builds
137
137
if sys .platform == 'darwin' :
138
138
cmake_args .append ("-DWITH_LAPACK=OFF" ) # Some OSX LAPACK fns are incompatible, see
139
139
# 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' ])
140
143
141
144
if sys .platform .startswith ('linux' ):
142
145
cmake_args .append ("-DWITH_IPP=OFF" ) # https://github.com/opencv/opencv/issues/10411
You can’t perform that action at this time.
0 commit comments