[sysprof] libsysprof: remove use of static library



commit a54892e33f0f69b3564df7e5f557b0dd600d9dac
Author: Christian Hergert <chergert redhat com>
Date:   Wed May 8 11:05:15 2019 -0700

    libsysprof: remove use of static library
    
    We can just include the files directly, and avoid the static
    linking and potential problems that come with that when porting
    the build system to other platforms.

 src/libsysprof-capture/meson.build | 14 +++++++-------
 src/libsysprof/meson.build         |  7 +++++--
 2 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/libsysprof-capture/meson.build b/src/libsysprof-capture/meson.build
index a67191e..f5d3dab 100644
--- a/src/libsysprof-capture/meson.build
+++ b/src/libsysprof-capture/meson.build
@@ -1,4 +1,4 @@
-libsysprof_capture_headers = [
+libsysprof_capture_headers = files([
   'sp-address.h',
   'sp-clock.h',
   'sp-capture-condition.h',
@@ -9,9 +9,9 @@ libsysprof_capture_headers = [
   'sp-platform.h',
   'sysprof-capture.h',
   'sysprof-version-macros.h',
-]
+])
 
-libsysprof_capture_sources = [
+libsysprof_capture_sources = files([
   'sp-address.c',
   'sp-capture-condition.c',
   'sp-capture-cursor.c',
@@ -20,7 +20,7 @@ libsysprof_capture_sources = [
   'sp-capture-writer.c',
   'sp-clock.c',
   'sp-platform.c',
-]
+])
 
 configure_file(
           input: 'sysprof-version.h.in',
@@ -33,8 +33,6 @@ libsysprof_capture_deps = [
   dependency('glib-2.0', version: glib_req_version),
 ]
 
-install_headers(libsysprof_capture_headers, subdir: sysprof_header_subdir)
-
 libsysprof_capture = static_library(
   'sysprof-capture-@0@'.format(libsysprof_api_version),
   libsysprof_capture_sources,
@@ -46,10 +44,12 @@ libsysprof_capture = static_library(
   gnu_symbol_visibility: 'hidden',
 )
 
+libsysprof_capture_include_dirs = include_directories('.')
+
 libsysprof_capture_dep = declare_dependency(
            link_whole: libsysprof_capture,
          dependencies: libsysprof_capture_deps,
-  include_directories: include_directories('.'),
+  include_directories: libsysprof_capture_include_dirs,
 )
 
 pkgconfig.generate(
diff --git a/src/libsysprof/meson.build b/src/libsysprof/meson.build
index 91a9148..c54937e 100644
--- a/src/libsysprof/meson.build
+++ b/src/libsysprof/meson.build
@@ -52,10 +52,12 @@ libsysprof_private_sources = [
   'sp-line-reader.c',
 ]
 
+libsysprof_public_sources += libsysprof_capture_sources
+libsysprof_public_headers += libsysprof_capture_headers
+
 libsysprof_deps = [
   dependency('gio-2.0', version: glib_req_version),
   dependency('gio-unix-2.0', version: glib_req_version),
-  libsysprof_capture_dep,
 ]
 
 if host_machine.system() == 'linux'
@@ -93,6 +95,7 @@ libsysprof = shared_library(
   'sysprof-@0@'.format(libsysprof_api_version),
   libsysprof_public_sources + libsysprof_private_sources,
 
+    include_directories: [include_directories('.'), libsysprof_capture_include_dirs],
            dependencies: libsysprof_deps,
                  c_args: libsysprof_c_args,
                 install: true,
@@ -103,7 +106,7 @@ libsysprof = shared_library(
 libsysprof_dep = declare_dependency(
             link_with: libsysprof,
          dependencies: libsysprof_deps,
-  include_directories: include_directories('.'),
+  include_directories: [include_directories('.'), libsysprof_capture_include_dirs],
 )
 
 pkgconfig.generate(


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