File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ option(JSONCPP_WITH_STRICT_ISO "Issue all the warnings demanded by strict ISO C
7878option (JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON )
7979option (JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON )
8080option (JSONCPP_WITH_EXAMPLE "Compile JsonCpp example" OFF )
81+ option (JSONCPP_WITH_INSTALL "make JsonCpp header and libraries part of the install target" ON )
8182option (JSONCPP_STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" OFF )
8283option (BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." ON )
8384option (BUILD_STATIC_LIBS "Build jsoncpp_lib as a static library." ON )
Original file line number Diff line number Diff line change 1+ if (JSONCPP_WITH_INSTALL)
2+
13file (GLOB INCLUDE_FILES "json/*.h" )
24install (FILES
35 ${INCLUDE_FILES}
46 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /json)
57
8+ endif ()
Original file line number Diff line number Diff line change @@ -196,10 +196,13 @@ if(BUILD_OBJECT_LIBS)
196196 list (APPEND CMAKE_TARGETS ${OBJECT_LIB} )
197197endif ()
198198
199+ if (JSONCPP_WITH_INSTALL)
200+
199201install (TARGETS ${CMAKE_TARGETS} ${INSTALL_EXPORT}
200202 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
201203 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
202204 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
203205 OBJECTS DESTINATION ${CMAKE_INSTALL_LIBDIR}
204206)
205207
208+ endif ()
You can’t perform that action at this time.
0 commit comments