#1080308 libjansson-dev: Provide cmake configuration file

Package:
libjansson-dev
Source:
libjansson-dev
Description:
C library for encoding, decoding and manipulating JSON data (dev)
Submitter:
Enrique Garcia
Date:
2026-06-05 06:13:02 UTC
Severity:
normal
#1080308#5
Date:
2024-09-01 21:43:42 UTC
From:
To:
I am trying to use the libjansson library from a cmake project using the Debian
installed package. However I found that the libjansson-dev package provides the
jansson.pc file that can be used with pkg-config but not the
janssonConfig.cmake file to be used by cmake projects.

It seems that the library has a dual build system: autotools and cmake
(https://jansson.readthedocs.io/en/latest/gettingstarted.html#compiling-and-
installing-jansson). I have tried to build it with cmake and in that case it
creates the cmake configuration files needed for cmake-based projects. However
the autotools-based build creates only the pkg-config configuration file.
Interestingly, the cmake-based build _also_ creates the pkg-config
configuration file, so I think that an easy way to solve the issue is to use
cmake to build the Debian package, which hopefully won't introduce any
regression since the already provided pgk-config file would still be installed.

#1080308#10
Date:
2026-04-26 11:50:40 UTC
From:
To:
Yes, please. Currently having the same issue. CMake configuration file
is needed for CoMaps build.

Also I couldn't notice that package seems to abandoned.

David

#1080308#15
Date:
2026-06-05 06:11:07 UTC
From:
To:
Hello all,

JFTR, it seems while building with cmake is indeed possible, there are
some upstream glitches that still need resolving, cf.

Exported symbols aren't consistent #715
https://github.com/akheron/jansson/issues/715
(various fixes suggested)

whereas some other things apparently were fixed already, but only in
newer versions than currently present in Debian, cf.

JSON_INTEGER_IS_LONG_LONG is part of API but it differs between cmake &
autotools (2.14) #696
https://github.com/akheron/jansson/issues/696
(resolved with 2.14.1)

Refactor tests to work better with CMake
https://github.com/akheron/jansson/commit/88375fb10ee775d0c07edd8394d09de34b7ebec3
(resolved with 2.14.1)

Use target-based cmake settings
https://github.com/akheron/jansson/commit/0f9c18dd1264704b55f41644aecbabf2567a9723
(resolved with 2.15.0)

Set minimum cmake version to 3.10
https://github.com/akheron/jansson/commit/aef13f87f18efec7c2a543045301602af6177a83
(resolved with 2.15.0)

cmake build with FetchContent
https://github.com/akheron/jansson/issues/724
(resolved with 2.15.0)

so switching to building with cmake first requires the new upstream
versions and then some more care.

JFTR, there exists https://bugs.debian.org/1130860 for handling that.

HTH,
Flo