Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pkgconfig file to be relocatable. #214

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ FILE(MAKE_DIRECTORY ${libDir})
FILE(MAKE_DIRECTORY ${incDir})

# generate build-time source
SET(dollar $)
CONFIGURE_FILE(api/yajl_version.h.cmake ${incDir}/yajl_version.h)
CONFIGURE_FILE(yajl.pc.cmake ${shareDir}/yajl.pc)
CONFIGURE_FILE(yajl.pc.cmake ${shareDir}/yajl.pc @ONLY)

# copy public headers to output directory
FOREACH (header ${PUB_HDRS})
Expand Down
12 changes: 6 additions & 6 deletions src/yajl.pc.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
prefix=${CMAKE_INSTALL_PREFIX}
libdir=${dollar}{prefix}/lib${LIB_SUFFIX}
includedir=${dollar}{prefix}/include/yajl
prefix=${pcfiledir}/../..
libdir=${prefix}/lib@LIB_SUFFIX@
includedir=${prefix}/include

Name: Yet Another JSON Library
Description: A Portable JSON parsing and serialization library in ANSI C
Version: ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}
Cflags: -I${dollar}{includedir}
Libs: -L${dollar}{libdir} -lyajl
Version: @YAJL_MAJOR@.@YAJL_MINOR@.@YAJL_MICRO@
Cflags: -I${includedir}
Libs: -L${libdir} -lyajl