File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,13 @@ if (WIN32)
216216 find_library (WS2_LIB ws2_32)
217217endif ()
218218
219+ if (APPLE )
220+ # Prefer libraries in the PREFIX over Apple-provided frameworks:
221+ if (NOT DEFINED CMAKE_FIND_FRAMEWORK)
222+ set (CMAKE_FIND_FRAMEWORK LAST)
223+ endif ()
224+ endif ()
225+
219226find_package (Threads REQUIRED)
220227find_package (PkgConfig REQUIRED)
221228
@@ -529,6 +536,14 @@ if (WITH_PYTHON)
529536 if (NOT DEFINED Python3_FIND_UNVERSIONED_NAMES)
530537 set (Python3_FIND_UNVERSIONED_NAMES FIRST)
531538 endif ()
539+ if (NOT DEFINED Python3_FIND_VIRTUALENV)
540+ # Don't prefer virtualenv python3: Prefer the one that's first on $PATH
541+ set (Python3_FIND_VIRTUALENV STANDARD)
542+ endif ()
543+ if (APPLE )
544+ # The macOS SDK-provided Python framework lacks SQLite3 support
545+ set (Python3_FIND_FRAMEWORK NEVER)
546+ endif ()
532547 find_package (Python3 ${PYTHON_MIN_VERSION} COMPONENTS Interpreter Development)
533548 if (NOT Python3_FOUND)
534549 message (SEND_ERROR "Python support enabled, but Python3 interpreter and/or libaries not found." )
You can’t perform that action at this time.
0 commit comments