mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 11:37:50 +00:00
Support for generating pkg-config file
This commit is contained in:
14
cppkafka.pc.in
Normal file
14
cppkafka.pc.in
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib
|
||||||
|
sharedlibdir=${prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: cppkafka
|
||||||
|
Url: https://github.com/mfontanini/cppkafka
|
||||||
|
Description: C++ wrapper library on top of RdKafka
|
||||||
|
Version: @CPPKAFKA_VERSION@
|
||||||
|
Requires: librdkafka >= 0.9.4
|
||||||
|
Requires.private:
|
||||||
|
Libs: -L${libdir} -L${sharedlibdir} -L@RDKAFKA_ROOT_DIR@/lib -lcppkafka -lrdkafka -lpthread -lrt -lssl -lcrypto -ldl -lz
|
||||||
|
Cflags: -I${includedir} -I${includedir}/cppkafka -I@RDKAFKA_ROOT_DIR@/include
|
||||||
@@ -10,7 +10,7 @@ function(make_cppkafka_header)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
#create file from template
|
#create file from template
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/cppkafka.h.in ${CPPKAFKA_HEADER})
|
configure_file(${PROJECT_SOURCE_DIR}/cppkafka.h.in ${CPPKAFKA_HEADER} @ONLY)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Run file generation function
|
# Run file generation function
|
||||||
|
|||||||
@@ -47,3 +47,13 @@ install(
|
|||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
COMPONENT dev
|
COMPONENT dev
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Generate package configuration file
|
||||||
|
set(PKG_CONFIG ${PROJECT_SOURCE_DIR}/package/cppkafka.pc)
|
||||||
|
configure_file(${PROJECT_SOURCE_DIR}/cppkafka.pc.in ${PKG_CONFIG} @ONLY)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES PKG_CONFIG
|
||||||
|
DESTINATION share/pkgconfig
|
||||||
|
COMPONENT pkgconfig
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user