mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-17 03:00:19 +00:00
Ensure gtkutil.h derives HAVE_GTK3 from GTK_MAJOR_VERSION when missing so GTK3/GTK4 builds select the correct typedefs and declarations in Windows builds that include gtkutil.h directly.
Link libX11 on non-Windows builds regardless of GTK2/GTK3 to satisfy the X11 symbols used in gtkutil.c, fixing the GTK2 linker failure.
This commit is contained in:
@@ -26,6 +26,14 @@
|
|||||||
|
|
||||||
typedef void (*filereqcallback) (void *, char *file);
|
typedef void (*filereqcallback) (void *, char *file);
|
||||||
|
|
||||||
|
#ifndef HAVE_GTK3
|
||||||
|
#if GTK_MAJOR_VERSION >= 3
|
||||||
|
#define HAVE_GTK3 1
|
||||||
|
#else
|
||||||
|
#define HAVE_GTK3 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_GTK3
|
#if HAVE_GTK3
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,10 +57,12 @@ endif
|
|||||||
|
|
||||||
zoitechat_gtk_deps += gtk_dep
|
zoitechat_gtk_deps += gtk_dep
|
||||||
|
|
||||||
if get_option('gtk3') and host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
gdk_x11_dep = dependency('gdk-x11-3.0', required: false)
|
if get_option('gtk3')
|
||||||
if gdk_x11_dep.found()
|
gdk_x11_dep = dependency('gdk-x11-3.0', required: false)
|
||||||
zoitechat_gtk_deps += gdk_x11_dep
|
if gdk_x11_dep.found()
|
||||||
|
zoitechat_gtk_deps += gdk_x11_dep
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
x11_dep = dependency('x11', required: false)
|
x11_dep = dependency('x11', required: false)
|
||||||
|
|||||||
Reference in New Issue
Block a user