Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba3547c

Browse filesBrowse files
committed
maybe this works
1 parent 09fecca commit ba3547c
Copy full SHA for ba3547c

File tree

2 files changed

+6
-3
lines changed
Filter options

2 files changed

+6
-3
lines changed

‎config.sh

Copy file name to clipboardExpand all lines: config.sh
+2-2Lines 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

Copy file name to clipboardExpand all lines: setup.py
+4-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.