deplibs: python use pkg-config from homebrew for ssl + xz
authorArto Kitula <arto.kitula@gmail.com>
Fri, 10 Aug 2018 22:45:46 +0000 (01:45 +0300)
committerArto Kitula <arto.kitula@gmail.com>
Fri, 10 Aug 2018 22:45:46 +0000 (01:45 +0300)
build_files/build_environment/cmake/python.cmake

index 6b3c25d32bfb8a77abaa3e494732f833f1843fe8..d24cfa1f5907f3f1e736dd7cc108d567dc88b471 100644 (file)
@@ -61,12 +61,12 @@ if(WIN32)
        message("POutput = ${PYTHON_OUTPUTDIR}")
 else()
        if(APPLE)
-               # we need to manually add homebrew headers to get ssl module building
-               set(PYTHON_CFLAGS "-I/usr/local/opt/openssl/include -I${OSX_SYSROOT}/usr/include ${PLATFORM_CFLAGS}")
-               set(PYTHON_LDFLAGS "-L/usr/local/opt/openssl/lib ${PLATFORM_LDFLAGS}")
-               set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export CFLAGS=${PYTHON_CFLAGS} && export LDFLAGS=${PYTHON_LDFLAGS})
+               # we need to add homebrew pkgconfig directories to get ssl, xz
+
+                set(BREW_PKG_CONFIG "/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig")
+               set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export PKG_CONFIG_PATH=${BREW_PKG_CONFIG})
                set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
-               set(PYTHON_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff)
+               set(PYTHON_PATCH echo .)
        else()
                set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
                set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)