[Bug 1653635] Re: cmake unable to report INCLUDE_DIRS and LIBRARIES
Timo Röhling
1653635 at bugs.launchpad.net
Thu Jan 20 09:03:43 UTC 2022
The CMake config exports the `jsoncpp_lib` and `jsoncpp_static` targets,
which will automatically perform all required settings when used with
`target_link_libraries()`. Manually setting the include paths and link
libraries is an anti-pattern.
** Changed in: libjsoncpp (Ubuntu)
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libjsoncpp in Ubuntu.
https://bugs.launchpad.net/bugs/1653635
Title:
cmake unable to report INCLUDE_DIRS and LIBRARIES
Status in libjsoncpp package in Ubuntu:
Invalid
Bug description:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
$ dpkg -l|grep libjsoncpp
ii libjsoncpp-dev:amd64 1.7.2-1 amd64 library for reading and writing JSON for C++ (devel files)
ii libjsoncpp1:amd64 1.7.2-1 amd64 library for reading and writing JSON for C++
When try to use jsoncpp, the ${jsoncpp_INCLUDE_DIRS} and
${jsoncpp_LIBRARIES} fail to report.
CMakeLists.txt
----------------
cmake_minimum_required(VERSION 2.6.2)
project(jsoncpp_test)
find_package(jsoncpp REQUIRED)
message("FOUND CONFIG: ${jsoncpp_CONFIG}")
message("INCLUDE DIRS: ${jsoncpp_INCLUDE_DIRS}")
message("LIBRARIES: ${jsoncpp_LIBRARIES}")
The actual result is:
--------------------
FOUND CONFIG: /usr/lib/x86_64-linux-gnu/cmake/jsoncpp/jsoncppConfig.cmake
INCLUDE DIRS:
LIBRARIES:
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libjsoncpp/+bug/1653635/+subscriptions
More information about the foundations-bugs
mailing list