Kaydet (Commit) aabc73d0 authored tarafından Caolán McNamara's avatar Caolán McNamara

Do the same thing for gio as we do for dbus

and add -DENABLE_GIO to flags at build-time and an empty gb_LinkTarget__use_gio
when disabled.

Change-Id: I4adf0701a3d490cceecc00f6b81d6416a1e83088
üst f8182a1c
......@@ -1117,6 +1117,7 @@ endef
endif # SYSTEM_LPSOLVE
ifeq ($(ENABLE_GIO),TRUE)
define gb_LinkTarget__use_gio
$(call gb_LinkTarget_set_include,$(1),\
......@@ -1124,10 +1125,22 @@ $(call gb_LinkTarget_set_include,$(1),\
$(GIO_CFLAGS) \
)
$(call gb_LinkTarget_add_defs,$(1),\
-DENABLE_GIO \
)
$(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
endef
else # ENABLE_GIO
define gb_LinkTarget__use_gio
endef
endif # ENABLE_GIO
define gb_LinkTarget__use_gtk
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
......
......@@ -108,13 +108,8 @@ $(eval $(call gb_Library_use_libraries,sd,\
$(eval $(call gb_Library_use_externals,sd,\
libxml2 \
))
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_use_externals,sd,\
gio \
))
endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_libraries,sd,\
......
......@@ -9,7 +9,7 @@
#include "BluetoothServer.hxx"
#include <stdio.h>
#ifdef LINUX
#if defined(LINUX) && defined(ENABLE_GIO) && defined(ENABLE_DBUS)
#include <glib.h>
#include <gio/gio.h>
#include <sys/unistd.h>
......@@ -53,7 +53,7 @@ struct oslSocketImpl {
void BluetoothServer::execute()
{
#ifdef LINUX
#if defined(LINUX) && defined(ENABLE_GIO) && defined(ENABLE_DBUS)
#ifdef GLIB_VERSION_2_26
g_type_init();
GError* aError = NULL;
......@@ -218,4 +218,4 @@ void BluetoothServer::setup( std::vector<Communicator*>* pCommunicators )
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,qstart_gtk,\
))
$(eval $(call gb_Library_use_externals,qstart_gtk,\
gio \
gtk \
libxml2 \
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment