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(