Skip to content

Commit

Permalink
aura: Build aura_builder on linux.
Browse files Browse the repository at this point in the history
. aura is never built with gtk anymore. So it's not necesary to disable GTK
  events in the message-pump.
. Make sure glib headers are included when building non-gtk aura.
. Update the 'glib' target to include gobject-2.0 and gthread-2.0 packages.

BUG=none
TEST=aura_builder builds on linux with use_aura=1

Review URL: http://codereview.chromium.org/8144009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104165 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sadrul@chromium.org committed Oct 5, 2011
1 parent 361a5f1 commit 2a078fb
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 24 deletions.
12 changes: 6 additions & 6 deletions build/linux/system.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -473,29 +473,29 @@
['_toolset=="target"', {
'direct_dependent_settings': {
'cflags': [
'<!@(<(pkg-config) --cflags glib-2.0)',
'<!@(<(pkg-config) --cflags glib-2.0 gobject-2.0 gthread-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other glib-2.0)',
'<!@(<(pkg-config) --libs-only-L --libs-only-other glib-2.0 gobject-2.0 gthread-2.0)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l glib-2.0)',
'<!@(<(pkg-config) --libs-only-l glib-2.0 gobject-2.0 gthread-2.0)',
],
},
}, {
'direct_dependent_settings': {
'cflags': [
'<!@(pkg-config --cflags glib-2.0)',
'<!@(pkg-config --cflags glib-2.0 gobject-2.0 gthread-2.0)',
],
},
'link_settings': {
'ldflags': [
'<!@(pkg-config --libs-only-L --libs-only-other glib-2.0)',
'<!@(pkg-config --libs-only-L --libs-only-other glib-2.0 gobject-2.0 gthread-2.0)',
],
'libraries': [
'<!@(pkg-config --libs-only-l glib-2.0)',
'<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0 gthread-2.0)',
],
},
}],
Expand Down
4 changes: 0 additions & 4 deletions ui/aura/demo/demo_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ int main(int argc, char** argv) {
icu_util::Initialize();
ResourceBundle::InitSharedInstance("en-US");

#if defined(TOOLKIT_USES_GTK)
base::MessagePumpX::DisableGtkMessagePump();
#endif

// Create the message-loop here before creating the desktop.
MessageLoop message_loop(MessageLoop::TYPE_UI);

Expand Down
4 changes: 0 additions & 4 deletions ui/aura_shell/aura_shell_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ int main(int argc, char** argv) {
icu_util::Initialize();
ResourceBundle::InitSharedInstance("en-US");

#if defined(TOOLKIT_USES_GTK)
base::MessagePumpX::DisableGtkMessagePump();
#endif

// Create the message-loop here before creating the desktop.
MessageLoop message_loop(MessageLoop::TYPE_UI);

Expand Down
4 changes: 0 additions & 4 deletions views/aura_desktop/aura_desktop_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ int main(int argc, char** argv) {
icu_util::Initialize();
ResourceBundle::InitSharedInstance("en-US");

#if defined(USE_X11)
base::MessagePumpX::DisableGtkMessagePump();
#endif

// Create the message-loop here before creating the desktop.
MessageLoop message_loop(MessageLoop::TYPE_UI);

Expand Down
9 changes: 8 additions & 1 deletion views/desktop/desktop_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@
#include "ui/wayland/wayland_message_pump.h"
#endif

#if defined(TOOLKIT_USES_GTK)
#include <gtk/gtk.h>
#elif defined(OS_LINUX)
#include <glib.h>
#include <glib-object.h>
#endif

int main(int argc, char** argv) {
#if defined(OS_WIN)
OleInitialize(NULL);
#elif defined(OS_LINUX)
// Initializes gtk stuff.
g_thread_init(NULL);
g_type_init();
#if !defined(USE_WAYLAND)
#if defined(TOOLKIT_USES_GTK) && !defined(USE_WAYLAND)
gtk_init(&argc, &argv);
#endif
#endif
Expand Down
13 changes: 8 additions & 5 deletions views/views.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'sources/': [ ['exclude', '_win\\.(h|cc)$'],
['exclude', '_gtk\\.(h|cc)$'],
['exclude', '_x\\.(h|cc)$'] ],
'dependencies': [ '../ui/aura/aura.gyp:aura', ],
}],
],
},
Expand Down Expand Up @@ -428,9 +429,6 @@
],
}],
['use_aura==1', {
'dependencies': [
'../ui/aura/aura.gyp:aura',
],
'sources/': [
['exclude', '_(gtk|x)\\.cc$'],
['exclude', '/(gtk|x)_[^/]*\\.cc$'],
Expand Down Expand Up @@ -854,6 +852,12 @@
['toolkit_uses_gtk == 1', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
},
],
['use_glib == 1', {
'dependencies': [
'../build/linux/system.gyp:glib',
'../chrome/chrome.gyp:packed_resources',
],
'conditions': [
Expand All @@ -863,8 +867,7 @@
],
}],
],
},
],
}],
['OS=="win"', {
'link_settings': {
'libraries': [
Expand Down

0 comments on commit 2a078fb

Please sign in to comment.