File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ if (CPPKAFKA_RDKAFKA_STATIC_LIB)
5656 add_definitions ("-DLIBRDKAFKA_STATICLIB" )
5757endif ()
5858
59+ if (NOT CPPKAFKA_PKGCONFIG_DIR)
60+ set (CPPKAFKA_PKGCONFIG_DIR share/pkgconfig)
61+ endif ()
62+
5963# Look for Boost (just need boost.optional headers here)
6064find_package (Boost REQUIRED ${FIND_PACKAGE_QUIET} )
6165find_package (RdKafka REQUIRED ${FIND_PACKAGE_QUIET} )
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ The following cmake options can be specified:
8080* ` CPPKAFKA_BOOST_STATIC_LIBS ` : Link with Boost static libraries. Default is ` ON ` .
8181* ` CPPKAFKA_BOOST_USE_MULTITHREADED ` : Use Boost multi-threaded libraries. Default is ` ON ` .
8282* ` CPPKAFKA_RDKAFKA_STATIC_LIB ` : Link to Rdkafka static library. Default is ` OFF ` .
83+ * ` CPPKAFKA_PKGCONFIG_DIR ` : Install location of the .pc file. Default is ` share/pkgconfig ` .
8384
8485Example:
8586``` Shell
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ Version: @CPPKAFKA_VERSION@
1111Requires: librdkafka >= 0.9.4
1212Requires.private:
1313Libs: -L${libdir} -L${sharedlibdir} -L@RDKAFKA_ROOT_DIR@/lib -lcppkafka -lrdkafka -lpthread -lrt -lssl -lcrypto -ldl -lz
14- Cflags: -I${includedir} -I${includedir}/cppkafka -I@RDKAFKA_ROOT_DIR@/include -I@Boost_INCLUDE_DIRS@
14+ Cflags: -I${includedir} -I${includedir}/cppkafka -I@RDKAFKA_INCLUDE_DIR@ -I@Boost_INCLUDE_DIRS@
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ set(PKG_CONFIG ${PROJECT_SOURCE_DIR}/package/cppkafka.pc)
5353configure_file (${PROJECT_SOURCE_DIR} /cppkafka.pc.in ${PKG_CONFIG} @ONLY)
5454
5555install (
56- FILES PKG_CONFIG
57- DESTINATION share/pkgconfig
56+ FILES ${ PKG_CONFIG}
57+ DESTINATION ${CPPKAFKA_PKGCONFIG_DIR}
5858 COMPONENT pkgconfig
5959)
You can’t perform that action at this time.
0 commit comments