improve odbc headers handling
This commit is contained in:
parent
7a72abad23
commit
5eff0b6c58
6 changed files with 29 additions and 12 deletions
|
@ -48,6 +48,24 @@ endef
|
|||
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_ODBC_HEADERS),YES)
|
||||
|
||||
define gb_LinkTarget__use_odbc_headers
|
||||
$(call gb_LinkTarget_add_defs,$(1),\
|
||||
-DSYSTEM_ODBC_HEADERS \
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
else
|
||||
|
||||
define gb_LinkTarget__use_odbc_headers
|
||||
$(call gb_LinkTarget_use_package,$(1),odbc_inc)
|
||||
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM_CPPUNIT),YES)
|
||||
|
||||
define gb_LinkTarget__use_cppunit
|
||||
|
|
|
@ -7403,7 +7403,6 @@ elif test "$enable_database_connectivity" != yes; then
|
|||
else
|
||||
AC_MSG_RESULT([internal])
|
||||
SYSTEM_ODBC_HEADERS=NO
|
||||
BUILD_TYPE="$BUILD_TYPE UNIXODBC"
|
||||
fi
|
||||
AC_SUBST(SYSTEM_ODBC_HEADERS)
|
||||
|
||||
|
|
|
@ -40,11 +40,7 @@ $(eval $(call gb_Library_set_include,odbc,\
|
|||
-I$(SRCDIR)/connectivity/source/inc \
|
||||
))
|
||||
|
||||
ifeq ($(SYSTEM_ODBC_HEADERS),YES)
|
||||
$(eval $(call gb_Library_add_defs,odbc,\
|
||||
-DSYSTEM_ODBC_HEADERS \
|
||||
))
|
||||
endif
|
||||
$(eval $(call gb_Library_use_external,odbc,odbc_headers))
|
||||
|
||||
$(eval $(call gb_Library_add_linked_libs,odbc,\
|
||||
odbcbase \
|
||||
|
|
|
@ -46,11 +46,7 @@ $(eval $(call gb_Library_add_defs,odbcbase,\
|
|||
-DOOO_DLLIMPLEMENTATION_ODBCBASE \
|
||||
))
|
||||
|
||||
ifeq ($(SYSTEM_ODBC_HEADERS),YES)
|
||||
$(eval $(call gb_Library_add_defs,odbcbase,\
|
||||
-DSYSTEM_ODBC_HEADERS \
|
||||
))
|
||||
endif
|
||||
$(eval $(call gb_Library_use_external,odbcbase,odbc_headers))
|
||||
|
||||
$(eval $(call gb_Library_add_linked_libs,odbcbase,\
|
||||
cppu \
|
||||
|
|
|
@ -42,7 +42,6 @@ $(eval $(call gb_Library_use_api,dbu,\
|
|||
|
||||
$(eval $(call gb_Library_add_defs,dbu,\
|
||||
-DDBACCESS_DLLIMPLEMENTATION \
|
||||
$(if $(filter YES,$(SYSTEM_ODBC_HEADERS)),-DSYSTEM_ODBC_HEADERS) \
|
||||
))
|
||||
|
||||
ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h
|
||||
|
@ -51,6 +50,8 @@ $(eval $(call gb_Library_add_cxxflags,dbu,\
|
|||
))
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_use_external,dbu,odbc_headers))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,dbu,\
|
||||
comphelper \
|
||||
cppu \
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||
#
|
||||
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
||||
#
|
||||
|
@ -29,6 +30,12 @@
|
|||
|
||||
$(eval $(call gb_Module_Module,unixODBC))
|
||||
|
||||
ifeq ($(SYSTEM_ODBC_HEADERS),NO)
|
||||
|
||||
$(eval $(call gb_Module_add_targets,unixODBC,\
|
||||
Package_inc \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
Loading…
Reference in a new issue