diff --git a/CMakeLists.txt b/CMakeLists.txt index b897a53..9814356 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,6 +324,23 @@ if(NOT MSVC OR ENABLE_VSTEST) add_subdirectory(tests) endif() +if(NOT MSVC) + # Create pkgconfig files. + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix \${prefix}) + set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) + set(includedir \${prefix}/include) + file(STRINGS "VERSION" VERSION LIMIT_COUNT 1) + file(GLOB OPENSSL_PKGCONFIGS "*.pc.in") + foreach(file ${OPENSSL_PKGCONFIGS}) + get_filename_component(filename ${file} NAME) + string(REPLACE ".in" "" new_file "${filename}") + configure_file(${filename} pkgconfig/${new_file} @ONLY) + endforeach() + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig + DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() + configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index b730954..1d1a159 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -3,5 +3,6 @@ if(ENABLE_LIBRESSL_INSTALL) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE PATTERN "compat" EXCLUDE + PATTERN "pqueue.h" EXCLUDE PATTERN "Makefile*" EXCLUDE) endif(ENABLE_LIBRESSL_INSTALL)