Commit 14f0a0ad authored by Matthias Clasen's avatar Matthias Clasen

Create a static library

Rearrange our build to create a libgtk.a for the the contents of gtk/,
and build libgtk-4.so from our per-subdirectory static libraries.
This will let us link tests statically for testing internal apis.
parent 64a2d022
......@@ -1106,15 +1106,22 @@ darwin_versions = [
]
# Library
libgtk = library('gtk-4',
soversion: gtk_soversion,
version: gtk_library_version,
libgtk_static = static_library('gtk',
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
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_with: [libgtk_css, libgdk, libgsk ],
)
libgtk = shared_library('gtk-4',
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, libgtk_css, libgdk, libgsk ],
link_args: common_ldflags,
soversion: gtk_soversion,
version: gtk_library_version,
darwin_versions: darwin_versions,
install: true,
)
......@@ -1264,4 +1271,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')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment