File tree 2 files changed +20
-0
lines changed 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ ENABLE_TESTING()
5
5
OPTION (JSONCPP_WITH_TESTS "Compile and run JsonCpp test executables" ON )
6
6
OPTION (JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post build step" ON )
7
7
OPTION (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 )
8
9
9
10
# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
10
11
IF (NOT WIN32 )
@@ -51,6 +52,15 @@ IF(JSONCPP_WITH_WARNING_AS_ERROR)
51
52
UseCompilationWarningAsError()
52
53
ENDIF (JSONCPP_WITH_WARNING_AS_ERROR)
53
54
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
+
54
64
# Build the different applications
55
65
ADD_SUBDIRECTORY ( src )
56
66
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