mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +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);
|
||||
|
||||
#ifndef HAVE_GTK3
|
||||
#if GTK_MAJOR_VERSION >= 3
|
||||
#define HAVE_GTK3 1
|
||||
#else
|
||||
#define HAVE_GTK3 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_GTK3
|
||||
typedef enum
|
||||
{
|
||||
|
||||
@@ -57,10 +57,12 @@ endif
|
||||
|
||||
zoitechat_gtk_deps += gtk_dep
|
||||
|
||||
if get_option('gtk3') and host_machine.system() != 'windows'
|
||||
gdk_x11_dep = dependency('gdk-x11-3.0', required: false)
|
||||
if gdk_x11_dep.found()
|
||||
zoitechat_gtk_deps += gdk_x11_dep
|
||||
if host_machine.system() != 'windows'
|
||||
if get_option('gtk3')
|
||||
gdk_x11_dep = dependency('gdk-x11-3.0', required: false)
|
||||
if gdk_x11_dep.found()
|
||||
zoitechat_gtk_deps += gdk_x11_dep
|
||||
endif
|
||||
endif
|
||||
|
||||
x11_dep = dependency('x11', required: false)
|
||||
|
||||
Reference in New Issue
Block a user