mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
Use cmake to create the json-c.pc file, as suggested by PR#362.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.7)
|
||||
project(json-c)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(json-c VERSION 0.12.99)
|
||||
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
@@ -121,3 +123,14 @@ install(TARGETS json-c json-c-static
|
||||
)
|
||||
|
||||
install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/json-c )
|
||||
|
||||
if (UNIX)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
set(VERSION ${PROJECT_VERSION})
|
||||
configure_file(json-c.pc.in json-c.pc @ONLY)
|
||||
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
|
||||
install(FILES ${CMAKE_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
|
||||
endif ()
|
||||
|
||||
@@ -21,6 +21,7 @@ Make any fixes/changes *before* branching.
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile
|
||||
Update the version in configure.ac
|
||||
Update the version in CMakeLists.txt
|
||||
Use ${release}.
|
||||
|
||||
Update the libjson_la_LDFLAGS line in Makefile.am to the new version.
|
||||
@@ -88,6 +89,7 @@ Add new section to ChangeLog
|
||||
Update the version in json_c_version.h
|
||||
Update the version in Doxyfile
|
||||
Update the version in configure.ac
|
||||
Update the version in CMakeLists.txt
|
||||
Use ${release}.99 to indicate a version "newer" than anything on the branch.
|
||||
|
||||
Leave the libjson_la_LDFLAGS line in Makefile.am alone.
|
||||
|
||||
Reference in New Issue
Block a user