fix(yaml-cpp): added proper meson install dir handling

This commit is contained in:
2025-08-11 12:32:04 -04:00
parent e71bf478d6
commit 067a3a0d51
2 changed files with 12 additions and 13 deletions

View File

@@ -1,19 +1,18 @@
cmake = import('cmake')
yaml_cpp_cmake_options = cmake.subproject_options() yaml_cpp_cmake_options = cmake.subproject_options()
yaml_cpp_cmake_options.add_cmake_defines({ yaml_cpp_cmake_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.5', 'BUILD_SHARED_LIBS': 'ON',
'BUILD_SHARED_LIBS': 'ON', 'YAML_CPP_BUILD_TESTS': 'OFF',
'CMAKE_SKIP_INSTALL_RULES': 'ON', 'CMAKE_CXX_FLAGS': '-Wno-shadow',
'YAML_CPP_BUILD_TESTS': 'OFF', 'CMAKE_C_FLAGS': '-Wno-shadow',
'CMAKE_CXX_FLAGS': '-Wno-shadow', 'CMAKE_INSTALL_LIBDIR': get_option('libdir'),
'CMAKE_C_FLAGS': '-Wno-shadow', 'CMAKE_INSTALL_INCLUDEDIR': get_option('includedir'),
}) 'CMAKE_POLICY_VERSION_MINIMUM': '3.5'
})
yaml_cpp_sp = cmake.subproject( yaml_cpp_sp = cmake.subproject(
'yaml-cpp', 'yaml-cpp',
options: yaml_cpp_cmake_options, options: yaml_cpp_cmake_options,
) )
yaml_cpp_dep = yaml_cpp_sp.dependency('yaml-cpp') yaml_cpp_dep = yaml_cpp_sp.dependency('yaml-cpp')
message('Registering yaml-cpp headers (' + meson.global_source_root() + '/subprojects/yaml-cpp/include/yaml-cpp) for installation...')
yaml_cpp_headers = meson.global_source_root() + '/subprojects/yaml-cpp/include/yaml-cpp'
install_subdir(yaml_cpp_headers, install_dir: get_option('includedir'))
message('Done registering yaml-cpp headers for installation!')

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', version: 'v1.1.2', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') project('libconfig', 'cpp', version: 'v1.1.3', 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')