[tepl] meson: Respect --default-library option



commit b9f4c2cf8a35f1dc92af481b0d1c08beb6fe6d10
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Tue Apr 14 14:44:48 2020 -0400

    meson: Respect --default-library option
    
    By using shared_library() we force build of only a shared library,
    change it to library() to build static, shared or both depending on what
    user asked in build options.

 docs/reference/meson.build |  2 +-
 tepl/meson.build           | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 5e292f7..3e750a3 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -20,7 +20,7 @@ GNOME.gtkdoc(
   gtkdoc_module_name,
   main_xml: 'tepl-docs.xml',
   src_dir: include_directories('../../tepl/'),
-  dependencies: TEPL_SHARED_LIB_DEP,
+  dependencies: TEPL_LIB_DEP,
   scan_args: ['--rebuild-types'],
   gobject_typesfile: 'tepl-@0@.types'.format(TEPL_API_VERSION),
   fixxref_args: [
diff --git a/tepl/meson.build b/tepl/meson.build
index 794c64e..9899f0a 100644
--- a/tepl/meson.build
+++ b/tepl/meson.build
@@ -122,7 +122,7 @@ TEPL_STATIC_DEP = declare_dependency(
 
 symbol_map = meson.current_source_dir() / 'symbol.map'
 
-tepl_shared_lib = shared_library(
+tepl_lib = library(
   'tepl-@0@'.format(TEPL_API_VERSION),
   link_whole: tepl_static_lib,
   link_args: '-Wl,--version-script,' + symbol_map,
@@ -131,9 +131,9 @@ tepl_shared_lib = shared_library(
   install: true
 )
 
-TEPL_SHARED_LIB_DEP = declare_dependency(
+TEPL_LIB_DEP = declare_dependency(
   include_directories: ROOT_INCLUDE_DIR,
-  link_with: tepl_shared_lib,
+  link_with: tepl_lib,
   sources: tepl_enum_types[1],
   dependencies: TEPL_DEPS
 )
@@ -142,14 +142,14 @@ PKG_CONFIG.generate(
   filebase: 'tepl-@0@'.format(TEPL_API_VERSION),
   name: 'Tepl',
   description: 'Text editor product line',
-  libraries: tepl_shared_lib,
+  libraries: tepl_lib,
   subdirs: 'tepl-@0@'.format(TEPL_API_VERSION),
   requires: TEPL_PUBLIC_DEPS,
   requires_private: TEPL_PRIVATE_DEPS
 )
 
 GNOME.generate_gir(
-  tepl_shared_lib,
+  tepl_lib,
   export_packages: 'tepl-@0@'.format(TEPL_API_VERSION),
   header: 'tepl/tepl.h',
   identifier_prefix: 'Tepl',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]