File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ IF(NOT WIN32)
1616 ENDIF (NOT CMAKE_BUILD_TYPE )
1717ENDIF (NOT WIN32 )
1818
19+ SET (RUNTIME_INSTALL_DIR lib
20+ CACHE PATH "Install dir for executables and dlls" )
21+ SET (ARCHIVE_INSTALL_DIR lib
22+ CACHE PATH "Install dir for static libraries" )
23+ SET (LIBRARY_INSTALL_DIR lib
24+ CACHE PATH "Install dir for shared libraries" )
25+ SET (INCLUDE_INSTALL_DIR include
26+ CACHE PATH "Install dir for headers" )
27+ MARK_AS_ADVANCED ( RUNTIME_INSTALL_DIR ARCHIVE_INSTALL_DIR INCLUDE_INSTALL_DIR )
28+
1929# This ensures shared DLL are in the same dir as executable on Windows.
2030# Put all executables / libraries are in a project global directory.
2131SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} /lib
Original file line number Diff line number Diff line change 11FILE (GLOB INCLUDE_FILES "json/*.h" )
2- INSTALL (FILES ${INCLUDE_FILES} DESTINATION include /json)
2+ INSTALL (FILES ${INCLUDE_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} /json)
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSI
4141
4242# Install instructions for this target
4343INSTALL ( TARGETS jsoncpp_lib
44- RUNTIME DESTINATION bin
45- LIBRARY DESTINATION lib
46- ARCHIVE DESTINATION lib
44+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
45+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
46+ ARCHIVE DESTINATION ${ARCHIVE_INSTALL_DIR}
4747)
You can’t perform that action at this time.
0 commit comments