1
0

install-pc-files.cmake 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. function(install_pc_file name pc_data)
  2. if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
  3. configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${name}.pc" @ONLY)
  4. endif()
  5. if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
  6. configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${name}.pc" @ONLY)
  7. endif()
  8. endfunction()
  9. install_pc_file(openssl [[
  10. Name: OpenSSL
  11. Description: Secure Sockets Layer and cryptography libraries and tools
  12. Requires: libssl libcrypto
  13. ]])
  14. install_pc_file(libssl [[
  15. Name: OpenSSL-libssl
  16. Description: Secure Sockets Layer and cryptography libraries
  17. Libs: -L"${libdir}" -llibssl
  18. Requires: libcrypto
  19. Cflags: -I"${includedir}"
  20. ]])
  21. install_pc_file(libcrypto [[
  22. Name: OpenSSL-libcrypto
  23. Description: OpenSSL cryptography library
  24. Libs: -L"${libdir}" -llibcrypto
  25. Libs.private: -lcrypt32 -lws2_32 -ladvapi32 -luser32
  26. Cflags: -I"${includedir}"
  27. ]])
  28. vcpkg_fixup_pkgconfig()