From 010540bd2d4846fdd3e6bdef9f5f77a0a29c83f2 Mon Sep 17 00:00:00 2001 From: Woodrow Douglass Date: Fri, 12 May 2023 11:44:24 -0400 Subject: [PATCH] use join_paths for constructing paths in the output Config.cmake --- meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index ab78d2b..be93a3c 100644 --- a/meson.build +++ b/meson.build @@ -82,22 +82,22 @@ if get_option('default_library') == 'shared' or get_option('default_library') == cmakeconf.set('MESON_SHARED_TARGET', ''' add_library(jsoncpp_lib IMPORTED SHARED) set_target_properties(jsoncpp_lib PROPERTIES - IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/''' + get_option('libdir') + '/' + shared_name + '''" - INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/''' + get_option('includedir') + '")') + IMPORTED_LOCATION "''' + join_paths('${PACKAGE_PREFIX_DIR}', get_option('libdir'), shared_name) + '''" + INTERFACE_INCLUDE_DIRECTORIES "''' + join_paths('${PACKAGE_PREFIX_DIR}', get_option('includedir')) + '")') endif if get_option('default_library') == 'static' or get_option('default_library') == 'both' cmakeconf.set('MESON_STATIC_TARGET', ''' add_library(jsoncpp_static IMPORTED STATIC) set_target_properties(jsoncpp_static PROPERTIES - IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/''' + get_option('libdir') + '/' + static_name + '''" - INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/''' + get_option('includedir') + '")') + IMPORTED_LOCATION "''' + join_paths('${PACKAGE_PREFIX_DIR}', get_option('libdir'), static_name) + '''" + INTERFACE_INCLUDE_DIRECTORIES "''' + join_paths('${PACKAGE_PREFIX_DIR}', get_option('includedir')) + '")') endif import('cmake').configure_package_config_file( name: 'jsoncpp', input: 'jsoncppConfig.cmake.meson.in', configuration: cmakeconf) -install_data('jsoncpp-namespaced-targets.cmake', install_dir : get_option('libdir') + '/cmake/' + jsoncpp_lib.name()) +install_data('jsoncpp-namespaced-targets.cmake', install_dir : join_paths(get_option('libdir'), 'cmake', jsoncpp_lib.name())) # for libraries bundling jsoncpp jsoncpp_dep = declare_dependency(