mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
libsysprof_capture_headers = [
|
libsysprof_capture_headers = files([
|
||||||
'sp-address.h',
|
'sp-address.h',
|
||||||
'sp-clock.h',
|
'sp-clock.h',
|
||||||
'sp-capture-condition.h',
|
'sp-capture-condition.h',
|
||||||
@ -9,9 +9,9 @@ libsysprof_capture_headers = [
|
|||||||
'sp-platform.h',
|
'sp-platform.h',
|
||||||
'sysprof-capture.h',
|
'sysprof-capture.h',
|
||||||
'sysprof-version-macros.h',
|
'sysprof-version-macros.h',
|
||||||
]
|
])
|
||||||
|
|
||||||
libsysprof_capture_sources = [
|
libsysprof_capture_sources = files([
|
||||||
'sp-address.c',
|
'sp-address.c',
|
||||||
'sp-capture-condition.c',
|
'sp-capture-condition.c',
|
||||||
'sp-capture-cursor.c',
|
'sp-capture-cursor.c',
|
||||||
@ -20,7 +20,7 @@ libsysprof_capture_sources = [
|
|||||||
'sp-capture-writer.c',
|
'sp-capture-writer.c',
|
||||||
'sp-clock.c',
|
'sp-clock.c',
|
||||||
'sp-platform.c',
|
'sp-platform.c',
|
||||||
]
|
])
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'sysprof-version.h.in',
|
input: 'sysprof-version.h.in',
|
||||||
@ -33,8 +33,6 @@ libsysprof_capture_deps = [
|
|||||||
dependency('glib-2.0', version: glib_req_version),
|
dependency('glib-2.0', version: glib_req_version),
|
||||||
]
|
]
|
||||||
|
|
||||||
install_headers(libsysprof_capture_headers, subdir: sysprof_header_subdir)
|
|
||||||
|
|
||||||
libsysprof_capture = static_library(
|
libsysprof_capture = static_library(
|
||||||
'sysprof-capture-@0@'.format(libsysprof_api_version),
|
'sysprof-capture-@0@'.format(libsysprof_api_version),
|
||||||
libsysprof_capture_sources,
|
libsysprof_capture_sources,
|
||||||
@ -46,10 +44,12 @@ libsysprof_capture = static_library(
|
|||||||
gnu_symbol_visibility: 'hidden',
|
gnu_symbol_visibility: 'hidden',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
libsysprof_capture_include_dirs = include_directories('.')
|
||||||
|
|
||||||
libsysprof_capture_dep = declare_dependency(
|
libsysprof_capture_dep = declare_dependency(
|
||||||
link_whole: libsysprof_capture,
|
link_whole: libsysprof_capture,
|
||||||
dependencies: libsysprof_capture_deps,
|
dependencies: libsysprof_capture_deps,
|
||||||
include_directories: include_directories('.'),
|
include_directories: libsysprof_capture_include_dirs,
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
|
|||||||
@ -52,10 +52,12 @@ libsysprof_private_sources = [
|
|||||||
'sp-line-reader.c',
|
'sp-line-reader.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
libsysprof_public_sources += libsysprof_capture_sources
|
||||||
|
libsysprof_public_headers += libsysprof_capture_headers
|
||||||
|
|
||||||
libsysprof_deps = [
|
libsysprof_deps = [
|
||||||
dependency('gio-2.0', version: glib_req_version),
|
dependency('gio-2.0', version: glib_req_version),
|
||||||
dependency('gio-unix-2.0', version: glib_req_version),
|
dependency('gio-unix-2.0', version: glib_req_version),
|
||||||
libsysprof_capture_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
@ -93,6 +95,7 @@ libsysprof = shared_library(
|
|||||||
'sysprof-@0@'.format(libsysprof_api_version),
|
'sysprof-@0@'.format(libsysprof_api_version),
|
||||||
libsysprof_public_sources + libsysprof_private_sources,
|
libsysprof_public_sources + libsysprof_private_sources,
|
||||||
|
|
||||||
|
include_directories: [include_directories('.'), libsysprof_capture_include_dirs],
|
||||||
dependencies: libsysprof_deps,
|
dependencies: libsysprof_deps,
|
||||||
c_args: libsysprof_c_args,
|
c_args: libsysprof_c_args,
|
||||||
install: true,
|
install: true,
|
||||||
@ -103,7 +106,7 @@ libsysprof = shared_library(
|
|||||||
libsysprof_dep = declare_dependency(
|
libsysprof_dep = declare_dependency(
|
||||||
link_with: libsysprof,
|
link_with: libsysprof,
|
||||||
dependencies: libsysprof_deps,
|
dependencies: libsysprof_deps,
|
||||||
include_directories: include_directories('.'),
|
include_directories: [include_directories('.'), libsysprof_capture_include_dirs],
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgconfig.generate(
|
pkgconfig.generate(
|
||||||
|
|||||||
Reference in New Issue
Block a user