Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite meson.build #77

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions data/build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ local meson_build_header_join_str = ",
# ----

project('Lyra','cpp',
version: '1.6',
version: '1.6.1',
default_options : ['cpp_std=c++11', 'cpp_eh=none', 'b_lto=true', 'warning_level=3'],
license: 'BSL-1.0')

Expand All @@ -88,15 +88,25 @@ $(lyra_headers_relative:J=$(meson_build_header_join_str))
"
]

inc_dir = [include_directories('include')]

lyra_lib = shared_library('lyra',
sources : src,
include_directories: inc_dir,
install: true,
install_dir : '/usr/lib')

lyra_dep = declare_dependency(include_directories: inc_dir, link_with: lyra_lib)
fs = import('fs')
foreach header : src
# use substring to drop `include/` prefix
install_headers(header, subdir : fs.parent(header.substring(8)))
endforeach

inc_dir = include_directories('include')

lyra_dep = declare_dependency(include_directories: inc_dir)

pkg = import('pkgconfig')
pkg.generate(
subdirs : 'lyra',
filebase : 'lyra',
version : meson.project_version(),
name : meson.project_name(),
description : 'A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond.',
url: 'https://github.com/bfgroup/Lyra',
)
" ;

.meson_build_file = $(.meson_build_file:J=) ;
Expand Down
26 changes: 18 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# ----

project('Lyra','cpp',
version: '1.6',
version: '1.6.1',
default_options : ['cpp_std=c++11', 'cpp_eh=none', 'b_lto=true', 'warning_level=3'],
license: 'BSL-1.0')

Expand Down Expand Up @@ -68,12 +68,22 @@ src = [
'include/lyra/version.hpp'
]

inc_dir = [include_directories('include')]
fs = import('fs')
foreach header : src
# use substring to drop `include/` prefix
install_headers(header, subdir : fs.parent(header.substring(8)))
endforeach

lyra_lib = shared_library('lyra',
sources : src,
include_directories: inc_dir,
install: true,
install_dir : '/usr/lib')
inc_dir = include_directories('include')

lyra_dep = declare_dependency(include_directories: inc_dir, link_with: lyra_lib)
lyra_dep = declare_dependency(include_directories: inc_dir)

pkg = import('pkgconfig')
pkg.generate(
subdirs : 'lyra',
filebase : 'lyra',
version : meson.project_version(),
name : meson.project_name(),
description : 'A simple to use, composing, header only, command line arguments parser for C++ 11 and beyond.',
url: 'https://github.com/bfgroup/Lyra',
)