[gtk/static-lib-for-tests: 1/2] Create a static library
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/static-lib-for-tests: 1/2] Create a static library
- Date: Sat, 23 Jan 2021 03:52:52 +0000 (UTC)
commit d48d50325a056fdb0538f8a1fd341468776f9683
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jan 22 21:50:55 2021 -0500
Create a static library
Rearrange our build to build libgtk-4.so from libgtk-4.a.
gtk/meson.build | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index f1fd696297..9f0eb17fe0 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1106,19 +1106,31 @@ darwin_versions = [
]
# Library
-libgtk = library('gtk-4',
- soversion: gtk_soversion,
- version: gtk_library_version,
+libgtk_static = static_library('gtk-4',
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
+ version: gtk_library_version,
c_args: gtk_cargs + common_cflags,
include_directories: [confinc, gdkinc, gskinc, gtkinc],
dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
link_whole: [libgtk_css, libgdk, libgsk, ],
link_args: common_ldflags,
darwin_versions: darwin_versions,
+ install: false,
+)
+
+libgtk = shared_library('gtk-4',
+ soversion: gtk_soversion,
+ version: gtk_library_version,
+ c_args: gtk_cargs + common_cflags,
+ include_directories: [confinc, gdkinc, gskinc, gtkinc],
+ dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
+ link_whole: libgtk_static,
+ link_args: common_ldflags,
+ darwin_versions: darwin_versions,
install: true,
)
+
gtk_dep_sources = [gtkversion, gtktypebuiltins_h]
# Introspection
@@ -1264,4 +1276,11 @@ libgtk_dep = declare_dependency(sources: gtk_dep_sources,
link_args: common_ldflags,
)
+libgtk_static_dep = declare_dependency(sources: gtk_dep_sources,
+ include_directories: [confinc, gtkinc],
+ dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep],
+ link_with: libgtk_static,
+ link_args: common_ldflags,
+)
+
subdir('tools')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]