qulogic/libgnt

Fix setup of build on Windows.

2018-11-23, Elliott Sales de Andrade
c6ed4f6deea1
Parents 33e8f6ea4cbd
Children 4279805cd2af
Fix setup of build on Windows.

This does not totally build yet due to some signal-related functions.
--- a/libgnt_winres.rc.in Fri Nov 23 17:41:01 2018 -0500
+++ b/libgnt_winres.rc.in Fri Nov 23 17:55:38 2018 -0500
@@ -15,12 +15,12 @@
BEGIN
VALUE "CompanyName", "The Pidgin developer community"
VALUE "FileDescription", "Glib ncurses toolkit"
- VALUE "FileVersion", "@GNT_VERSION@"
+ VALUE "FileVersion", @GNT_VERSION@
VALUE "InternalName", "libgnt"
VALUE "LegalCopyright", "Copyright (C) 1998-2014 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
- VALUE "OriginalFilename", "libgnt-@GNT_API_VERSION@.dll"
+ VALUE "OriginalFilename", "libgnt-@GNT_MAJOR_VERSION@.dll"
VALUE "ProductName", "libgnt"
- VALUE "ProductVersion", "@GNT_VERSION@"
+ VALUE "ProductVersion", @GNT_VERSION@
END
END
BLOCK "VarFileInfo"
--- a/meson.build Fri Nov 23 17:41:01 2018 -0500
+++ b/meson.build Fri Nov 23 17:55:38 2018 -0500
@@ -134,6 +134,14 @@
ncurses_widechar = false
endif
+if not ncurses_available and host_machine.system() == 'windows'
+ # Try pdcurses too.
+ ncurses_header = 'curses.h'
+ ncurses_libs = compiler.find_library('pdcurses', required : false)
+ ncurses_available = compiler.has_header(ncurses_header) and ncurses_libs.found()
+ ncurses = declare_dependency(dependencies : ncurses_libs)
+endif
+
if not ncurses_available
error('ncurses could not be found!')
endif
@@ -219,7 +227,12 @@
install_headers(libgnt_headers, subdir : 'gnt')
if host_machine.system() == 'windows'
- libgnt_SOURCES += windows.compile_resources('libgnt_winres.rc')
+ windows = import('windows')
+ libgnt_winres = configure_file(
+ input : 'libgnt_winres.rc.in',
+ output : 'libgnt_winres.rc',
+ configuration : gnt_config)
+ libgnt_SOURCES += windows.compile_resources(libgnt_winres)
endif
libgnt_inc = include_directories('.')
@@ -246,7 +259,7 @@
variables : ['plugindir = ${libdir}/gnt'],
)
-if get_option('introspection')
+if get_option('introspection') and host_machine.system() != 'windows'
libgnt_gir = gnome.generate_gir(libgnt,
sources : libgnt_headers,
includes : 'GObject-2.0',