File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments