improve odbc headers handling

This commit is contained in:
Matúš Kukan 2012-04-07 13:46:59 +02:00 committed by David Tardon
parent 7a72abad23
commit 5eff0b6c58
6 changed files with 29 additions and 12 deletions

View file

@ -48,6 +48,24 @@ endef
endif 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) ifeq ($(SYSTEM_CPPUNIT),YES)
define gb_LinkTarget__use_cppunit define gb_LinkTarget__use_cppunit

View file

@ -7403,7 +7403,6 @@ elif test "$enable_database_connectivity" != yes; then
else else
AC_MSG_RESULT([internal]) AC_MSG_RESULT([internal])
SYSTEM_ODBC_HEADERS=NO SYSTEM_ODBC_HEADERS=NO
BUILD_TYPE="$BUILD_TYPE UNIXODBC"
fi fi
AC_SUBST(SYSTEM_ODBC_HEADERS) AC_SUBST(SYSTEM_ODBC_HEADERS)

View file

@ -40,11 +40,7 @@ $(eval $(call gb_Library_set_include,odbc,\
-I$(SRCDIR)/connectivity/source/inc \ -I$(SRCDIR)/connectivity/source/inc \
)) ))
ifeq ($(SYSTEM_ODBC_HEADERS),YES) $(eval $(call gb_Library_use_external,odbc,odbc_headers))
$(eval $(call gb_Library_add_defs,odbc,\
-DSYSTEM_ODBC_HEADERS \
))
endif
$(eval $(call gb_Library_add_linked_libs,odbc,\ $(eval $(call gb_Library_add_linked_libs,odbc,\
odbcbase \ odbcbase \

View file

@ -46,11 +46,7 @@ $(eval $(call gb_Library_add_defs,odbcbase,\
-DOOO_DLLIMPLEMENTATION_ODBCBASE \ -DOOO_DLLIMPLEMENTATION_ODBCBASE \
)) ))
ifeq ($(SYSTEM_ODBC_HEADERS),YES) $(eval $(call gb_Library_use_external,odbcbase,odbc_headers))
$(eval $(call gb_Library_add_defs,odbcbase,\
-DSYSTEM_ODBC_HEADERS \
))
endif
$(eval $(call gb_Library_add_linked_libs,odbcbase,\ $(eval $(call gb_Library_add_linked_libs,odbcbase,\
cppu \ cppu \

View file

@ -42,7 +42,6 @@ $(eval $(call gb_Library_use_api,dbu,\
$(eval $(call gb_Library_add_defs,dbu,\ $(eval $(call gb_Library_add_defs,dbu,\
-DDBACCESS_DLLIMPLEMENTATION \ -DDBACCESS_DLLIMPLEMENTATION \
$(if $(filter YES,$(SYSTEM_ODBC_HEADERS)),-DSYSTEM_ODBC_HEADERS) \
)) ))
ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h
@ -51,6 +50,8 @@ $(eval $(call gb_Library_add_cxxflags,dbu,\
)) ))
endif endif
$(eval $(call gb_Library_use_external,dbu,odbc_headers))
$(eval $(call gb_Library_use_libraries,dbu,\ $(eval $(call gb_Library_use_libraries,dbu,\
comphelper \ comphelper \
cppu \ cppu \

View file

@ -1,3 +1,4 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# #
# Version: MPL 1.1 / GPLv3+ / LGPLv3+ # Version: MPL 1.1 / GPLv3+ / LGPLv3+
# #
@ -29,6 +30,12 @@
$(eval $(call gb_Module_Module,unixODBC)) $(eval $(call gb_Module_Module,unixODBC))
ifeq ($(SYSTEM_ODBC_HEADERS),NO)
$(eval $(call gb_Module_add_targets,unixODBC,\ $(eval $(call gb_Module_add_targets,unixODBC,\
Package_inc \ Package_inc \
)) ))
endif
# vim: set noet sw=4 ts=4: