Refactor Gtk OSX Application support

This commit is contained in:
Sebastian Ramacher 2021-01-05 09:46:31 +01:00
parent bf3d1d820d
commit 0150d47204
3 changed files with 9 additions and 18 deletions

View File

@ -50,7 +50,6 @@ build_dependencies = [libm, girara, glib, gio, gthread, gmodule, gtk3, cairo]
if host_machine.system() == 'darwin'
gtk_mac_integration = dependency('gtk-mac-integration-gtk3')
build_dependencies += gtk_mac_integration
conf_data.set('GTKOSXAPPLICATION', true)
endif
@ -62,6 +61,10 @@ defines = [
'-D_DEFAULT_SOURCE',
]
if host_machine.system() == 'darwin'
defines += '-DGTKOSXAPPLICATION'
endif
# compile flags
flags = [
'-Werror=implicit-function-declaration',
@ -109,12 +112,6 @@ version_header = configure_file(
configuration: conf_data
)
os_dependency_header = configure_file(
input: 'zathura/os-dependency.h.in',
output: 'zathura-os-dependency.h',
configuration: conf_data
)
include_directories = [
include_directories('.')
]
@ -157,7 +154,7 @@ sources = files(
sources += zathura_resources
sources += additional_sources
# header fiels to install
# header files to install
headers = files(
'zathura/document.h',
'zathura/links.h',
@ -167,7 +164,6 @@ headers = files(
'zathura/types.h',
)
headers += version_header
headers += os_dependency_header
# zathura helper library
libzathura = static_library('zathura',

View File

@ -1,6 +1,9 @@
/* SPDX-License-Identifier: Zlib */
#include "zathura-os-dependency.h"
#ifdef GTKOSXAPPLICATION
#include <gtkosxapplication.h>
#endif
#include <girara/settings.h>
#include <girara/log.h>

View File

@ -1,8 +0,0 @@
/* SPDX-License-Identifier: Zlib */
#mesondefine GTKOSXAPPLICATION
#ifdef GTKOSXAPPLICATION
#include <gtkosxapplication.h>
#endif