File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ENABLE_TESTING()
55OPTION (JSONCPP_WITH_TESTS "Compile and run JsonCpp test executables" ON )
66OPTION (JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON )
77OPTION (JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF )
8+ OPTION (JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON )
89
910# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
1011IF (NOT WIN32 )
@@ -51,6 +52,15 @@ IF(JSONCPP_WITH_WARNING_AS_ERROR)
5152 UseCompilationWarningAsError ()
5253ENDIF (JSONCPP_WITH_WARNING_AS_ERROR )
5354
55+ IF (JSONCPP_WITH_PKGCONFIG_SUPPORT)
56+ CONFIGURE_FILE (
57+ "pkg-config/jsoncpp.pc.in"
58+ "pkg-config/jsoncpp.pc"
59+ @ONLY )
60+ INSTALL (FILES "${CMAKE_BINARY_DIR} /pkg-config/jsoncpp.pc"
61+ DESTINATION "${CMAKE_INSTALL_PREFIX} /lib/pkgconfig" )
62+ ENDIF (JSONCPP_WITH_PKGCONFIG_SUPPORT )
63+
5464# Build the different applications
5565ADD_SUBDIRECTORY ( src )
5666
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix=${prefix}
3+ libdir=${exec_prefix}/lib
4+ includedir=${prefix}/include
5+
6+ Name: jsoncpp
7+ Description: A C++ library for interacting with JSON
8+ URL: https://github.com/open-source-parsers/jsoncpp
9+ Libs: -L${libdir} -ljsoncpp
10+ Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments