build(header_install_dir-+-vendor): vendored quill and added header_install_dir option
this helps with wheel installs BREAKING CHANGE:
This commit is contained in:
@@ -15,8 +15,11 @@ quill_sp = cmake.subproject(
|
||||
|
||||
quill_dep = quill_sp.dependency('quill')
|
||||
|
||||
if get_option('default_library') != 'static' and get_option('lib_install_dir') == ''
|
||||
if get_option('default_library') != 'static'
|
||||
message('Registering quill headers for installation...')
|
||||
quill_headers = meson.global_source_root() + '/subprojects/quill/include/quill'
|
||||
install_subdir(quill_headers, install_dir: get_option('includedir'))
|
||||
|
||||
|
||||
|
||||
install_subdir(quill_headers, install_dir: vendor_logging_header_install_dir)
|
||||
endif
|
||||
|
||||
14
meson.build
14
meson.build
@@ -18,11 +18,18 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# *********************************************************************** #
|
||||
project('liblogging', 'cpp', version: 'v1.1.4', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
project('liblogging', 'cpp', version: 'v1.1.5', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||
|
||||
# Add default visibility for all C++ targets
|
||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||
|
||||
logging_header_install_dir = get_option('header_install_dir') != '' \
|
||||
? get_option('header_install_dir') / 'fourdst' / 'logging' \
|
||||
: get_option('includedir') / 'fourdst' / 'logging'
|
||||
|
||||
vendor_logging_header_install_dir = get_option('header_install_dir') != '' \
|
||||
? get_option('header_install_dir') / 'fourdst' / 'vendor' \
|
||||
: get_option('includedir') / 'fourdst' / 'vendor'
|
||||
|
||||
subdir('build-config')
|
||||
subdir('src')
|
||||
@@ -37,14 +44,15 @@ endif
|
||||
|
||||
if get_option('pkg_config')
|
||||
message('Generating pkg-config file for liblogging...')
|
||||
vendor_inc_flags = '-I' + vendor_logging_header_install_dir
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(
|
||||
name: 'liblogging',
|
||||
description: 'Logging manager for SERiF and related projects',
|
||||
version: meson.project_version(),
|
||||
libraries: [liblogging,'-Wl,-rpath,${libdir}'],
|
||||
subdirs: ['fourdst'],
|
||||
filebase: 'fourdst_logging',
|
||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
|
||||
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
|
||||
extra_cflags: vendor_inc_flags
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -2,3 +2,4 @@ option('pkg_config', type: 'boolean', value: true, description: 'generate pkg-co
|
||||
option('build_tests', type: 'boolean', value: true, description: 'generate unit tests (uses gtest)')
|
||||
option('build_examples', type: 'boolean', value: true, description: 'generate example programs')
|
||||
option('lib_install_dir', type: 'string', value: '', description: 'Override install dir for the shared library (used by the fourdst umbrella to place libs inside the Python package in wheel builds). Empty = default libdir.')
|
||||
option('header_install_dir', type: 'string', value: '', description: 'Override the header install root (used by the fourdst umbrella to place headers inside the Python package in wheel builds). Empty = default includedir.')
|
||||
|
||||
@@ -48,4 +48,4 @@ logging_dep = declare_dependency(
|
||||
logging_headers = files(
|
||||
'include/fourdst/logging/logging.h'
|
||||
)
|
||||
install_headers(logging_headers, subdir : 'fourdst/logging')
|
||||
install_headers(logging_headers, install_dir: logging_header_install_dir)
|
||||
|
||||
Reference in New Issue
Block a user