Create a jsoncppConfig.cmake file, even if building under meson

This commit is contained in:
Woodrow Douglass 2023-05-02 09:00:38 -04:00
parent 8190e061bc
commit 0ca7385016
No known key found for this signature in database
GPG Key ID: EC0BB8B94F361E14
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,6 @@
@PACKAGE_INIT@
add_library(jsoncpp_lib IMPORTED SHARED)
set_target_properties(jsoncpp_lib PROPERTIES
IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/lib/libjsoncpp.so"
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include")

View File

@ -62,6 +62,13 @@ import('pkgconfig').generate(
filebase : 'jsoncpp', filebase : 'jsoncpp',
description : 'A C++ library for interacting with JSON') description : 'A C++ library for interacting with JSON')
cmakeconf = configuration_data()
import('cmake').configure_package_config_file(
name: 'jsoncpp',
input: 'jsoncppConfig.cmake.meson.in',
configuration: cmakeconf)
# for libraries bundling jsoncpp # for libraries bundling jsoncpp
jsoncpp_dep = declare_dependency( jsoncpp_dep = declare_dependency(
include_directories : jsoncpp_include_directories, include_directories : jsoncpp_include_directories,