Skip to content

Commit

Permalink
Generate and install pkgconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
tranzystorekk committed Apr 16, 2023
1 parent 8b24019 commit d80ea39
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,24 @@ write_basic_package_version_file(
COMPATIBILITY AnyNewerVersion
)

# generate pkg-config file
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/liboqs.pc.in
${CMAKE_CURRENT_BINARY_DIR}/liboqs.pc
@ONLY
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/liboqsConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/liboqsConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/liboqs"
)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/liboqs.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

install(TARGETS oqs
EXPORT liboqsTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
10 changes: 10 additions & 0 deletions src/liboqs.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/lib
includedir=${prefix}/include

Name: @PROJECT_NAME@
Description: Library for quantum-safe cryptographic algorithms
Version: @OQS_VERSION_TEXT@
Requires.private: openssl
Cflags: -I${includedir}
Libs: -L${libdir} -loqs

0 comments on commit d80ea39

Please # to comment.