1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/vendor/POCO/Data/MySQL/MySQL.make

62 lines
1.7 KiB
Plaintext
Raw Normal View History

2021-08-22 17:07:06 +02:00
#
# MySQL.make
#
2023-03-23 19:19:11 +01:00
# Makefile fragment for finding MySQL headers and library
2021-08-22 17:07:06 +02:00
#
2023-03-23 19:19:11 +01:00
ifeq ($(OSNAME),Darwin)
POCO_MYSQL_CONFIG = $(shell whereis -bq mysql_config)
2021-08-22 17:07:06 +02:00
else
2023-03-23 19:19:11 +01:00
ifeq ($(OSNAME),Linux)
POCO_MYSQL_CONFIG = $(shell which mysql_config)
endif
2021-08-22 17:07:06 +02:00
endif
2023-03-23 19:19:11 +01:00
ifneq (, $(POCO_MYSQL_CONFIG))
ifndef POCO_MYSQL_INCLUDE
POCO_MYSQL_INCLUDE = $(shell mysql_config --include)
endif
ifndef POCO_MYSQL_LIB
POCO_MYSQL_LIB = $(shell mysql_config --libs)
endif
2021-08-22 17:07:06 +02:00
else
2023-03-23 19:19:11 +01:00
ifndef POCO_MYSQL_INCLUDE
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
POCO_MYSQL_INCLUDE = -I/usr/local/include
else
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include/mysql; echo $$?))
POCO_MYSQL_INCLUDE = -I/usr/local/opt/mysql-client/include/mysql
else
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include; echo $$?))
POCO_MYSQL_INCLUDE = -I/usr/local/opt/mysql-client/include
else
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/include; echo $$?))
POCO_MYSQL_INCLUDE = -I/opt/homebrew/opt/mysql-client/include
endif
endif
endif
endif
endif
ifndef POCO_MYSQL_LIB
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
POCO_MYSQL_LIB = -L/usr/local/lib
else
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/lib; echo $$?))
POCO_MYSQL_LIB = -L/usr/local/opt/mysql-client/lib
else
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/lib; echo $$?))
POCO_MYSQL_LIB = -L/opt/homebrew/opt/mysql-client/lib
endif
endif
endif
endif
2021-08-22 17:07:06 +02:00
endif
ifdef POCO_MYSQL_INCLUDE
2023-03-23 19:19:11 +01:00
INCLUDE += $(POCO_MYSQL_INCLUDE)
2021-08-22 17:07:06 +02:00
endif
ifdef POCO_MYSQL_LIB
2023-03-23 19:19:11 +01:00
SYSLIBS += $(POCO_MYSQL_LIB)
2021-08-22 17:07:06 +02:00
endif