[libpeas/1.24: 10/11] meson: build loaders as modules instead of shared libraries



commit 21560e93fb3d6c57b801ff5db3f342074db25645
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 28 10:19:34 2019 -0700

    meson: build loaders as modules instead of shared libraries
    
    Also: ensure that the extension of the loader plugins is set to so on
    macOS
    
    # Conflicts:
    #       meson.build

 loaders/lua5.1/meson.build  | 5 +++--
 loaders/python/meson.build  | 5 +++--
 loaders/python3/meson.build | 5 +++--
 meson.build                 | 2 ++
 4 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/loaders/lua5.1/meson.build b/loaders/lua5.1/meson.build
index 9dfe010..cc44ec8 100644
--- a/loaders/lua5.1/meson.build
+++ b/loaders/lua5.1/meson.build
@@ -27,7 +27,7 @@ lua51_loader_c_args = [
   '-DLGI_MICRO_VERSION=@0@'.format(lua51_lgi_version_micro),
 ]
 
-lua51_loader_sha = shared_library(
+lua51_loader_sha = shared_module(
   lua51_loader_name,
   lua51_loader_c + lua51_loader_res,
   include_directories: rootdir,
@@ -37,5 +37,6 @@ lua51_loader_sha = shared_library(
   install_dir: join_paths(
     pkglibdir,
     'loaders',
-  )
+  ),
+  name_suffix: module_suffix
 )
diff --git a/loaders/python/meson.build b/loaders/python/meson.build
index 1629496..215f3ef 100644
--- a/loaders/python/meson.build
+++ b/loaders/python/meson.build
@@ -31,7 +31,7 @@ python2_loader_c_args = [
   '-DPYGOBJECT_MICRO_VERSION=@0@'.format(pygobject_version_micro),
 ]
 
-python2_loader_sha = shared_library(
+python2_loader_sha = shared_module(
   python2_loader_name,
   python2_loader_c + python2_loader_res,
   include_directories: rootdir,
@@ -41,5 +41,6 @@ python2_loader_sha = shared_library(
   install_dir: join_paths(
     pkglibdir,
     'loaders',
-  )
+  ),
+  name_suffix: module_suffix
 )
diff --git a/loaders/python3/meson.build b/loaders/python3/meson.build
index 5b350a0..a97c81e 100644
--- a/loaders/python3/meson.build
+++ b/loaders/python3/meson.build
@@ -31,7 +31,7 @@ python3_loader_c_args = [
   '-DPYGOBJECT_MICRO_VERSION=@0@'.format(pygobject_version_micro),
 ]
 
-python3_loader_sha = shared_library(
+python3_loader_sha = shared_module(
   python3_loader_name,
   python3_loader_c + python3_loader_res,
   include_directories: rootdir,
@@ -41,5 +41,6 @@ python3_loader_sha = shared_library(
   install_dir: join_paths(
     pkglibdir,
     'loaders',
-  )
+  ),
+  name_suffix: module_suffix
 )
diff --git a/meson.build b/meson.build
index 2753672..f816600 100644
--- a/meson.build
+++ b/meson.build
@@ -122,9 +122,11 @@ luajit_dep = dependency('luajit', version: luajit_req, required: false)
 luajit_prg = find_program('luajit', required: false)
 xmllint_prg = find_program('xmllint', required: false)
 
+module_suffix = []
 if build_machine.system() == 'darwin'
   config_h.set('OS_OSX', 1)
   add_languages('objc')
+  module_suffix = 'so'
 endif
 
 # Detect and set symbol visibility


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