mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
fix include/lib paths for Apple Silicon
This commit is contained in:
@@ -4,20 +4,37 @@
|
|||||||
# Makefile fragment for finding MySQL library
|
# Makefile fragment for finding MySQL library
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifndef POCO_MYSQL_INCLUDE
|
||||||
|
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
|
||||||
|
POCO_MYSQL_INCLUDE = /usr/local/include
|
||||||
|
else
|
||||||
|
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include; echo $$?))
|
||||||
|
POCO_MYSQL_INCLUDE = /usr/local/opt/mysql-client/include
|
||||||
|
else
|
||||||
|
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/include; echo $$?))
|
||||||
|
POCO_MYSQL_INCLUDE = /opt/homebrew/opt/mysql-client/include
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Note: linking order is important, do not change it.
|
ifndef POCO_MYSQL_LIB
|
||||||
|
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
|
||||||
|
POCO_MYSQL_LIB = /usr/local/lib
|
||||||
|
else
|
||||||
|
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/lib; echo $$?))
|
||||||
|
POCO_MYSQL_LIB = /usr/local/opt/mysql-client/lib
|
||||||
|
else
|
||||||
|
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/lib; echo $$?))
|
||||||
|
POCO_MYSQL_LIB = /opt/homebrew/opt/mysql-client/lib
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef POCO_MYSQL_INCLUDE
|
ifdef POCO_MYSQL_INCLUDE
|
||||||
INCLUDE += -I$(POCO_MYSQL_INCLUDE)
|
INCLUDE += -I$(POCO_MYSQL_INCLUDE)
|
||||||
else
|
|
||||||
INCLUDE += -I./../include -I/usr/local/include/mysql -I/usr/include/mysql/ -I/usr/mysql/include/mysql -I/usr/local/mysql/include -I/usr/local/opt/mysql-client/include -I/usr/local/opt/mysql-client/include/mysql
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef POCO_MYSQL_LIB
|
ifdef POCO_MYSQL_LIB
|
||||||
SYSLIBS += -L$(POCO_MYSQL_LIB)
|
SYSLIBS += -L$(POCO_MYSQL_LIB)
|
||||||
else
|
|
||||||
SYSLIBS += -L/usr/local/lib -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -L/usr/local/opt/mysql-client/lib
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Note: linking order is important, do not change it.
|
|
||||||
SYSLIBS += -lmysqlclient -lz -lpthread -ldl
|
|
||||||
|
@@ -20,6 +20,9 @@ endif
|
|||||||
ifeq (0, $(shell test -e /usr/local/opt/libpq/include; echo $$?))
|
ifeq (0, $(shell test -e /usr/local/opt/libpq/include; echo $$?))
|
||||||
INCLUDE += -I/usr/local/opt/libpq/include
|
INCLUDE += -I/usr/local/opt/libpq/include
|
||||||
endif
|
endif
|
||||||
|
ifeq (0, $(shell test -e /opt/homebrew/opt/libpq/include; echo $$?))
|
||||||
|
INCLUDE += -I/opt/homebrew/opt/libpq/include
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef POCO_PGSQL_LIB
|
ifndef POCO_PGSQL_LIB
|
||||||
@@ -41,6 +44,9 @@ endif
|
|||||||
ifeq (0, $(shell test -e /usr/local/opt/libpq/lib; echo $$?))
|
ifeq (0, $(shell test -e /usr/local/opt/libpq/lib; echo $$?))
|
||||||
SYSLIBS += -L/usr/local/opt/libpq/lib$(LIB64SUFFIX)
|
SYSLIBS += -L/usr/local/opt/libpq/lib$(LIB64SUFFIX)
|
||||||
endif
|
endif
|
||||||
|
ifeq (0, $(shell test -e /opt/homebrew/opt/libpq/lib; echo $$?))
|
||||||
|
SYSLIBS += -L/opt/homebrew/opt/libpq/lib$(LIB64SUFFIX)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
SYSLIBS += -lpq
|
SYSLIBS += -lpq
|
||||||
|
|
||||||
|
@@ -11,11 +11,15 @@
|
|||||||
#
|
#
|
||||||
LINKMODE ?= SHARED
|
LINKMODE ?= SHARED
|
||||||
|
|
||||||
ARCHFLAGS ?= -arch $(OSARCH)
|
ARCHFLAGS ?= -arch $(POCO_HOST_OSARCH)
|
||||||
SANITIZEFLAGS ?=
|
SANITIZEFLAGS ?=
|
||||||
OSFLAGS ?= -mmacosx-version-min=10.11 -isysroot $(shell xcrun --show-sdk-path)
|
OSFLAGS ?= -mmacosx-version-min=10.11 -isysroot $(shell xcrun --show-sdk-path)
|
||||||
|
|
||||||
|
ifeq ($(POCO_HOST_OSARCH),arm64)
|
||||||
|
OPENSSL_DIR ?= /opt/homebrew/opt/openssl
|
||||||
|
else
|
||||||
OPENSSL_DIR ?= /usr/local/opt/openssl
|
OPENSSL_DIR ?= /usr/local/opt/openssl
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tools
|
# Tools
|
||||||
|
Reference in New Issue
Block a user