Browse Source

Add and install pkgconfig file

pull/3/head
Jason Rhinelander 2 years ago
parent
commit
a4ec2c982b
  1. 6
      CMakeLists.txt
  2. 13
      liblokimq.pc.in

6
CMakeLists.txt

@ -19,6 +19,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries instead of static ones" ON)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
configure_file(lokimq/version.h.in lokimq/version.h @ONLY)
configure_file(liblokimq.pc.in liblokimq.pc @ONLY)
add_library(lokimq
lokimq/auth.cpp
@ -111,6 +112,11 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/liblokimq.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(lokimq_IS_TOPLEVEL_PROJECT TRUE)
else()

13
liblokimq.pc.in

@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: liblokimq
Description: ZeroMQ-based communication library for Loki
Version: @LOKIMQ_VERSION@
Libs: -L${libdir} -llokimq
Libs.private: @PRIVATE_LIBS@
Requires.private: libzmq libsodium
Cflags: -I${includedir}
Loading…
Cancel
Save