|
|
cfc8a5 |
From fa324fc228691cd2b1aa86dbbde43f37a5dd7758 Mon Sep 17 00:00:00 2001
|
|
|
cfc8a5 |
From: Christian Hergert <chergert@redhat.com>
|
|
|
cfc8a5 |
Date: Sun, 7 Mar 2021 08:54:15 -0800
|
|
|
cfc8a5 |
Subject: [PATCH 1/1] build: ensure access to resources in corelib build
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
This should help with some transient build failures in dependent projects.
|
|
|
cfc8a5 |
---
|
|
|
cfc8a5 |
gtksourceview/meson.build | 13 +++++++------
|
|
|
cfc8a5 |
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
|
|
|
cfc8a5 |
index fd080a9c..b6192604 100644
|
|
|
cfc8a5 |
--- a/gtksourceview/meson.build
|
|
|
cfc8a5 |
+++ b/gtksourceview/meson.build
|
|
|
cfc8a5 |
@@ -145,122 +145,123 @@ core_enums_header = '''
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
|
|
|
cfc8a5 |
# error "Only <gtksourceview/gtksource.h> can be included directly."
|
|
|
cfc8a5 |
#endif
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
#include <gtksourceview/gtksourceversion.h>
|
|
|
cfc8a5 |
'''
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
core_enums = gnome.mkenums_simple('gtksource-enumtypes',
|
|
|
cfc8a5 |
sources: core_public_h,
|
|
|
cfc8a5 |
identifier_prefix: 'GtkSource',
|
|
|
cfc8a5 |
symbol_prefix: 'gtk_source',
|
|
|
cfc8a5 |
header_prefix: core_enums_header,
|
|
|
cfc8a5 |
decorator: 'GTK_SOURCE_ENUM_EXTERN',
|
|
|
cfc8a5 |
install_header: true,
|
|
|
cfc8a5 |
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
version_h = configuration_data()
|
|
|
cfc8a5 |
version_h.set('GTK_SOURCE_MAJOR_VERSION', version_major)
|
|
|
cfc8a5 |
version_h.set('GTK_SOURCE_MINOR_VERSION', version_minor)
|
|
|
cfc8a5 |
version_h.set('GTK_SOURCE_MICRO_VERSION', version_micro)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
gtksourceversion_h = configure_file(
|
|
|
cfc8a5 |
input: 'gtksourceversion.h.in',
|
|
|
cfc8a5 |
output: 'gtksourceversion.h',
|
|
|
cfc8a5 |
configuration: version_h,
|
|
|
cfc8a5 |
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
+gtksource_res = gnome.compile_resources(
|
|
|
cfc8a5 |
+ 'gtksourceview-gresources',
|
|
|
cfc8a5 |
+ 'gtksourceview.gresource.xml'
|
|
|
cfc8a5 |
+)
|
|
|
cfc8a5 |
+
|
|
|
cfc8a5 |
core_sources = [
|
|
|
cfc8a5 |
core_public_c,
|
|
|
cfc8a5 |
core_private_c,
|
|
|
cfc8a5 |
core_enums,
|
|
|
cfc8a5 |
gtksourceversion_h,
|
|
|
cfc8a5 |
core_marshallers,
|
|
|
cfc8a5 |
+ gtksource_res,
|
|
|
cfc8a5 |
]
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
install_headers(
|
|
|
cfc8a5 |
core_public_h,
|
|
|
cfc8a5 |
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
core_enums_h = core_enums.get(1)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
# Unfortunately, Visual Studio builds must build the core
|
|
|
cfc8a5 |
# sources twice, once for the GtkSourceView DLL, and once for
|
|
|
cfc8a5 |
# the tests (static core lib), so that we can ensure that
|
|
|
cfc8a5 |
# all the items from the core sources are properly linked into
|
|
|
cfc8a5 |
# the final GtkSourceView DLL and exported from it.
|
|
|
cfc8a5 |
core_lib = static_library(package_string + 'core', core_sources,
|
|
|
cfc8a5 |
include_directories: gtksourceview_include_dirs,
|
|
|
cfc8a5 |
dependencies: core_deps,
|
|
|
cfc8a5 |
c_args: core_c_args,
|
|
|
cfc8a5 |
install: false
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
core_dep = declare_dependency(
|
|
|
cfc8a5 |
link_with: core_lib,
|
|
|
cfc8a5 |
include_directories: rootdir,
|
|
|
cfc8a5 |
dependencies: core_deps,
|
|
|
cfc8a5 |
sources: [core_enums_h]
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
gtksource_deps = [
|
|
|
cfc8a5 |
core_dep,
|
|
|
cfc8a5 |
]
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
gtksource_libs = [core_lib]
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
extra_public_sources = []
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
subdir('completion-providers')
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
-gtksource_res = gnome.compile_resources(
|
|
|
cfc8a5 |
- 'gtksourceview-gresources',
|
|
|
cfc8a5 |
- 'gtksourceview.gresource.xml'
|
|
|
cfc8a5 |
-)
|
|
|
cfc8a5 |
-
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
# We can't use the static libs on Visual Studio builds
|
|
|
cfc8a5 |
# to form our DLL here directly, so we must use
|
|
|
cfc8a5 |
# extract_all_objects() to extract all the core and word
|
|
|
cfc8a5 |
# completion provider objects that we previously built
|
|
|
cfc8a5 |
# into static .lib's and link them into the main DLL
|
|
|
cfc8a5 |
# instead
|
|
|
cfc8a5 |
gtksource_objs = []
|
|
|
cfc8a5 |
foreach int_lib : gtksource_libs
|
|
|
cfc8a5 |
gtksource_objs += int_lib.extract_all_objects()
|
|
|
cfc8a5 |
endforeach
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
-gtksource_lib = shared_library(package_string, gtksource_res,
|
|
|
cfc8a5 |
+gtksource_lib = shared_library(package_string,
|
|
|
cfc8a5 |
version: lib_version,
|
|
|
cfc8a5 |
darwin_versions: lib_osx_version,
|
|
|
cfc8a5 |
include_directories: gtksourceview_include_dirs,
|
|
|
cfc8a5 |
dependencies: cc.get_id() == 'msvc' ? core_deps : gtksource_deps,
|
|
|
cfc8a5 |
objects: cc.get_id() == 'msvc' ? gtksource_objs : [],
|
|
|
cfc8a5 |
link_whole: cc.get_id() == 'msvc' ? [] : gtksource_libs,
|
|
|
cfc8a5 |
c_args: core_c_args,
|
|
|
cfc8a5 |
link_args: release_link_args,
|
|
|
cfc8a5 |
install: true,
|
|
|
cfc8a5 |
gnu_symbol_visibility: 'hidden',
|
|
|
cfc8a5 |
)
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
gtksource_dep_sources = [
|
|
|
cfc8a5 |
core_enums_h,
|
|
|
cfc8a5 |
]
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
if generate_gir
|
|
|
cfc8a5 |
gtksource_gir_sources = [
|
|
|
cfc8a5 |
core_public_c,
|
|
|
cfc8a5 |
core_public_h,
|
|
|
cfc8a5 |
core_enums_h,
|
|
|
cfc8a5 |
extra_public_sources,
|
|
|
cfc8a5 |
]
|
|
|
cfc8a5 |
|
|
|
cfc8a5 |
gtksource_gir = gnome.generate_gir(gtksource_lib,
|
|
|
cfc8a5 |
sources: gtksource_gir_sources,
|
|
|
cfc8a5 |
nsversion: api_version,
|
|
|
cfc8a5 |
namespace: 'GtkSource',
|
|
|
cfc8a5 |
symbol_prefix: 'gtk_source',
|
|
|
cfc8a5 |
identifier_prefix: 'GtkSource',
|
|
|
cfc8a5 |
--
|
|
|
cfc8a5 |
2.39.1
|
|
|
cfc8a5 |
|