build(vendor-libraries): update install to be more reliable

vendor libaries for libconfig are now properly installed so linking can be done reliably
This commit is contained in:
2026-06-05 11:19:17 +02:00
parent 5adadc2f41
commit 3937a2b828
7 changed files with 23 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ PROJECT_NAME = libconfig
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = v2.2.4 PROJECT_NUMBER = v2.2.5
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewers a # for a project that appears at the top of each page and should give viewers a

View File

@@ -1,3 +1,4 @@
cmake = import('cmake') cmake = import('cmake')
subdir('tomlpp')
subdir('reflect-cpp') subdir('reflect-cpp')
subdir('CLI11') subdir('CLI11')

View File

@@ -1,4 +1,3 @@
tomlpp_dep = dependency('tomlplusplus', required: true, static: true).as_system()
reflect_cpp_sources = files( reflect_cpp_sources = files(
'src/yyjson.c', 'src/yyjson.c',
@@ -21,7 +20,7 @@ reflect_cpp_library = static_library(
'reflect_cpp', 'reflect_cpp',
reflect_cpp_sources, reflect_cpp_sources,
include_directories: reflect_cpp_include_dirs, include_directories: reflect_cpp_include_dirs,
install: false, install: true,
dependencies: [tomlpp_dep], dependencies: [tomlpp_dep],
) )
@@ -29,4 +28,10 @@ reflect_cpp_dep = declare_dependency(
link_with: reflect_cpp_library, link_with: reflect_cpp_library,
include_directories: reflect_cpp_include_dirs, include_directories: reflect_cpp_include_dirs,
dependencies: [tomlpp_dep], dependencies: [tomlpp_dep],
) )
install_subdir(
'include',
install_dir: get_option('includedir'),
strip_directory: true
)

View File

@@ -0,0 +1,7 @@
tomlpp_dep = dependency('tomlplusplus', required: true, static: true).as_system()
install_subdir(
meson.project_source_root() / 'subprojects' / 'tomlplusplus-3.4.0' / 'include',
install_dir: get_option('includedir'),
strip_directory: true
)

View File

@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# *********************************************************************** # # *********************************************************************** #
project('libconfig', ['cpp', 'c'], version: 'v2.2.4', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') project('libconfig', ['cpp', 'c'], version: 'v2.2.5', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
# Add default visibility for all C++ targets # Add default visibility for all C++ targets
add_project_arguments('-fvisibility=default', language: 'cpp') add_project_arguments('-fvisibility=default', language: 'cpp')
@@ -42,7 +42,7 @@ if get_option('pkg_config')
name: 'libconfig', name: 'libconfig',
description: 'Configuration module for SERiF and related projects', description: 'Configuration module for SERiF and related projects',
version: meson.project_version(), version: meson.project_version(),
subdirs: ['fourdst'], libraries: [reflect_cpp_library],
filebase: 'fourdst_config', filebase: 'fourdst_config',
install_dir: join_paths(get_option('libdir'), 'pkgconfig') install_dir: join_paths(get_option('libdir'), 'pkgconfig')
) )

View File

@@ -2,8 +2,8 @@
#include "fourdst/config/ansi.h" #include "fourdst/config/ansi.h"
#include <rfl.hpp> #include "rfl.hpp"
#include <toml++/toml.h> #include "toml++/toml.hpp"
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <vector> #include <vector>

View File

@@ -12,8 +12,8 @@ config_headers = files(
) )
install_headers(config_headers, subdir : 'fourdst/config') install_headers(config_headers, subdir : 'fourdst/config')
condig_exception_headers = files( config_exception_headers = files(
'include/fourdst/config/exceptions/exceptions.h', 'include/fourdst/config/exceptions/exceptions.h',
) )
install_headers(config_headers, subdir : 'fourdst/config/exceptions') install_headers(config_exception_headers, subdir : 'fourdst/config/exceptions')