Commit 21ba95ad authored by Hubert Chathi's avatar Hubert Chathi
Browse files

create and install a pkg-config file on Unix-like systems

parent cabefb17
......@@ -64,10 +64,14 @@ set_target_properties(olm PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
include(GNUInstallDirs)
# Make a pkg-config file
configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY NEWLINE_STYLE UNIX)
#
# Installation
#
include(GNUInstallDirs)
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Olm)
install(TARGETS olm
EXPORT olm-targets
......@@ -86,6 +90,12 @@ install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/olm/sas.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/olm)
if (UNIX AND NOT APPLE)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
endif ()
# Export the targets to a script.
install(EXPORT olm-targets
FILE OlmTargets.cmake
......
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
Name: olm
Description: implementation of the Double Ratchet cryptographic ratchet in C++
Version: @PROJECT_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lolm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment