Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
9ea7ddec
Commit
9ea7ddec
authored
Jan 21, 2019
by
Justin Brewer
Committed by
Mark Nunberg
Feb 20, 2019
Browse files
Generate and install hiredis.pc
Signed-off-by:
Justin Brewer
<
jzb0012@auburn.edu
>
parent
edfab35c
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9ea7ddec
...
...
@@ -18,7 +18,8 @@ getVersionBit(HIREDIS_MAJOR)
getVersionBit
(
HIREDIS_MINOR
)
getVersionBit
(
HIREDIS_PATCH
)
MESSAGE
(
"Detected version:
${
HIREDIS_MAJOR
}
.
${
HIREDIS_MINOR
}
.
${
HIREDIS_PATCH
}
"
)
SET
(
VERSION
"
${
HIREDIS_MAJOR
}
.
${
HIREDIS_MINOR
}
.
${
HIREDIS_PATCH
}
"
)
MESSAGE
(
"Detected version:
${
VERSION
}
"
)
INCLUDE_DIRECTORIES
(
${
PROJECT_SOURCE_DIR
}
)
...
...
@@ -32,7 +33,9 @@ ADD_LIBRARY(hiredis SHARED
SET_TARGET_PROPERTIES
(
hiredis
PROPERTIES
VERSION
"
${
HIREDIS_MAJOR
}
.
${
HIREDIS_MINOR
}
.
${
HIREDIS_PATCH
}
"
)
VERSION
"
${
VERSION
}
"
)
CONFIGURE_FILE
(
hiredis.pc.in hiredis.pc @ONLY
)
INSTALL
(
TARGETS hiredis
DESTINATION
"
${
CMAKE_INSTALL_LIBDIR
}
"
)
...
...
@@ -40,6 +43,9 @@ INSTALL(TARGETS hiredis
INSTALL
(
FILES hiredis.h read.h sds.h async.h
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/hiredis
)
INSTALL
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/hiredis.pc
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/pkgconfig
)
# Add tests: Currently, I don't know how to make the tests actually run
# without hanging!
ENABLE_TESTING
()
...
...
hiredis.pc.in
0 → 100644
View file @
9ea7ddec
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
pkgincludedir=${includedir}/hiredis
Name: hiredis
Description: Minimalistic C client library for Redis.
Version: @VERSION@
Libs: -L${libdir} -lhiredis
Cflags: -I${pkgincludedir} -D_FILE_OFFSET_BITS=64
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment