From 0b787becc1c00c3993a5aa90eede67e0e15e0ca0 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Tue, 18 Dec 2018 12:15:26 -0600 Subject: [PATCH] GTK+: Fix minizip includes. Add default options. --- gtk/meson.build | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/gtk/meson.build b/gtk/meson.build index e42ae5e1..7c687fd0 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -1,4 +1,9 @@ -project('snes9x-gtk', ['c', 'cpp'], version: '1.58', default_options: ['cpp_std=c++11']) +project('snes9x-gtk', + ['c', 'cpp'], + version: '1.58', + default_options: ['cpp_std=c++11', + 'buildtype=release', + 'strip=true']) subdir('po') subdir('data') @@ -6,7 +11,7 @@ subdir('data') args = [ '-DSNES9X_GTK', '-DUNZIP_SUPPORT', '-DNETPLAY_SUPPORT', '-DJMA_SUPPORT', '-Wall', '-W', '-Wno-unused-parameter' ] srcs = [] deps = [] -includes = include_directories('../apu/bapu', '../', 'src') +includes = [ '../apu/bapu', '../', 'src' ] prefix = get_option('prefix') localedir = join_paths(prefix, get_option('localedir')) @@ -144,16 +149,15 @@ if get_option('screenshot') endif endif -if get_option('system-zip') - systemzip_dep = dependency('minizip', required: false) +systemzip_dep = dependency('minizip', required: false) - if systemzip_dep.found() - args += '-DSYSTEM_ZIP' - deps += systemzip_dep - else - message('minizip not found. Using built-in minizip.') - srcs += [ '../unzip/unzip.c', '../unzip/ioapi.c', '../unzip/zip.c' ] - endif +if get_option('system-zip') and systemzip_dep.found() + args += '-DSYSTEM_ZIP' + deps += systemzip_dep +else + message('Using built-in minizip.') + includes += '../unzip' + srcs += [ '../unzip/unzip.c', '../unzip/ioapi.c', '../unzip/zip.c' ] endif if get_option('zlib') @@ -325,7 +329,7 @@ libjma = static_library('jma', libjma_srcs, c_args: args, cpp_args: [args, '-fexceptions'], - include_directories: includes) + include_directories: include_directories(includes)) sourcify = executable('sourcify', 'src/sourcify.c') gtk_snes9x_ui_cpp = custom_target('sourcify', @@ -339,7 +343,7 @@ snes9x_gtk = executable('snes9x-gtk', c_args: args, cpp_args: [args, '-fno-exceptions', '-fno-rtti'], dependencies: deps, - include_directories: includes, + include_directories: include_directories(includes), link_with: libjma, install: true)