Buildsystem: Fix paths

Fix library and include paths in pkg-config, CMakeLists.txt and the
CMake config files.
This commit is contained in:
Max Bruckner 2016-11-06 14:54:43 +07:00
parent 251e5a5e34
commit f9ce93029a
5 changed files with 10 additions and 11 deletions

View File

@ -17,8 +17,9 @@ endif()
#variables for pkg-config #variables for pkg-config
set(prefix "${CMAKE_INSTALL_PREFIX}") set(prefix "${CMAKE_INSTALL_PREFIX}")
set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") set(libdir "${CMAKE_INSTALL_LIBDIR}")
set(version "${CJSON_VERSION}") set(version "${CJSON_VERSION}")
set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(BUILD_SHARED_LIBS "Build shared libraries" ON)

View File

@ -8,7 +8,7 @@ set(CJSON_UTILS_LIBRARY @CJSON_UTILS_LIB@)
# The cJSON library # The cJSON library
set(CJSON_LIBRARY @CJSON_LIB@) set(CJSON_LIBRARY @CJSON_LIB@)
# The include directories used by cJSON # The include directories used by cJSON
set(CJSON_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) set(CJSON_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@")
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${_dir}/cJSONConfigTargets.cmake") include("${_dir}/cJSONConfigTargets.cmake")

View File

@ -1,4 +1,4 @@
set(PACKAGE_VERSION "@PROJECT_VERSION@") set(PACKAGE_VERSION "@CJSON_VERSION@")
# Check whether the requested PACKAGE_FIND_VERSION is compatible # Check whether the requested PACKAGE_FIND_VERSION is compatible
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")

View File

@ -1,10 +1,9 @@
prefix=@prefix@ prefix=@prefix@
libdir=@libdir@ libdir=${prefix}/@libdir@
includedir=${prefix}/include/cJSON includedir=${prefix}/@includedir@
version=@version@
Name: libcjson Name: libcjson
Version: ${version} Version: @version@
Description: Ultralightweight JSON parser in ANSI C Description: Ultralightweight JSON parser in ANSI C
Libs: -L${libdir} -lcjson Libs: -L${libdir} -lcjson
Cflags: -I${includedir} Cflags: -I${includedir}

View File

@ -1,10 +1,9 @@
prefix=@prefix@ prefix=@prefix@
libdir=@libdir@ libdir=${prefix}/@libdir@
includedir=${prefix}/include/cJSON includedir=${prefix}/@includedir@
version=@version@
Name: libcjson_utils Name: libcjson_utils
Version: ${version} Version: @version@
Description: An implementation of JSON Pointer, Patch and Merge Patch based on cJSON. Description: An implementation of JSON Pointer, Patch and Merge Patch based on cJSON.
Libs: -L${libdir} -lcjson_utils Libs: -L${libdir} -lcjson_utils
Cflags: -I${includedir} Cflags: -I${includedir}