Commit ce473462 authored by Tom Schoonjans's avatar Tom Schoonjans
Browse files

Build: use gtk-mac-integration only when creating bundle

Gtk-mac-integration was used only when creating the bundle,
So there's no need to drag it as a dependency just because the build
occurs on a macOS with a Gtk installation with Quartz backend.
parent ac5b9d45
......@@ -306,7 +306,6 @@ dnl ================================================================
_gdk_tgt=`$PKG_CONFIG --variable=targets gdk-3.0`
AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
if test "x$_gdk_tgt" = xquartz; then
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk3)
GTK_MAC_BUNDLE_FLAG=
......@@ -315,6 +314,7 @@ if test "x$_gdk_tgt" = xquartz; then
build_bundle=yes, build_bundle=no)
if test "x$build_bundle" = xyes; then
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk3)
AC_MSG_NOTICE([enableing mac bundle..])
GTK_MAC_BUNDLE_FLAG=-DMAC_BUNDLE
......
......@@ -47,7 +47,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#ifdef MAC_INTEGRATION
#ifdef MAC_BUNDLE
# include <gtkosxapplication.h>
#endif
......@@ -166,13 +166,13 @@ build_package_paths (void)
if (path)
pixmaps_dir = g_strdup (path);
#if defined (G_OS_WIN32) || (defined (MAC_INTEGRATION) && defined (MAC_BUNDLE))
#if defined (G_OS_WIN32) || defined (MAC_BUNDLE)
gchar *prefix;
# ifdef G_OS_WIN32
prefix = g_win32_get_package_installation_directory_of_module (NULL);
# else // defined (MAC_INTEGRATION) && defined (MAC_BUNDLE)
# else // defined (MAC_BUNDLE)
prefix = quartz_application_get_resource_path ();
# endif
......
......@@ -671,7 +671,7 @@ glade_popup_is_popup_event (GdkEventButton *event)
{
g_return_val_if_fail (event, FALSE);
#ifdef MAC_INTEGRATION
#ifdef __APPLE__
return (event->type == GDK_BUTTON_PRESS && event->button == 1 &&
((event->state & GDK_MOD1_MASK) != 0));
#else
......
......@@ -176,8 +176,8 @@ c_flags = common_flags
ldflags = []
if enable_mac_integration
private_deps += gtk_mac_integration_gtk3_dep
if get_option('mac_bundle')
private_deps += gtk_mac_integration_gtk3_dep
c_flags += '-DMAC_BUNDLE'
endif
endif
......
......@@ -147,9 +147,9 @@ have_webkit2gtk = webkit2gtk_dep.found()
# Check for GDK Quartz and MacOSX integration package
enable_mac_integration = dependency('gdk-3.0').get_pkgconfig_variable('targets').contains('quartz')
if enable_mac_integration
gtk_mac_integration_gtk3_dep = dependency('gtk-mac-integration-gtk3')
if get_option('mac_bundle')
gtk_mac_integration_gtk3_dep = dependency('gtk-mac-integration-gtk3')
gtk_mac_bundle_flags = '-DMAC_BUNDLE'
endif
endif
......
......@@ -47,11 +47,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#ifdef MAC_INTEGRATION
# include <gtkosxapplication.h>
#endif
#define ACTION_GROUP_STATIC "GladeStatic"
#define ACTION_GROUP_PROJECT "GladeProject"
#define ACTION_GROUP_PROJECTS_LIST_MENU "GladeProjectsList"
......
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