diff --git a/CMakeLists.txt b/CMakeLists.txt index 53a454f..295d770 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,6 +494,7 @@ add_subdirectory(ssl) add_subdirectory(apps) add_subdirectory(engines) add_subdirectory(tools) +add_subdirectory(exporters) # OpenSSL 1.1 redesigns the whole test program. # It currently depends on configdata.pm (It did "eval" it instead of "use" it. See "util/perl/OpenSSL/Test/Utils.pm", line 87) which we never generate in CMake. diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index c78c1c4..3816d39 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -201,11 +201,6 @@ install(FILES ${CMAKE_SOURCE_DIR}/openssl/apps/openssl.cnf DESTINATION ${OPENSSL_OPENSSLDIR} ) -configure_file(openssl.pc.cmake.in openssl.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openssl.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -) - if (BUILD_TESTING) if ( ( WIN32 OR CYGWIN ) AND BUILD_SHARED_LIBS ) get_target_property(CRYPTO_RUNTIME_OUTPUT_NAME crypto RUNTIME_OUTPUT_NAME) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 7600cd7..3366ece 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -612,9 +612,3 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/openssl/include/openssl REGEX "^.+\\.in$" EXCLUDE REGEX "^(.*[/\\])?__DECC_INCLUDE.+$" EXCLUDE ) - -# issue: can't specify zlib path, especially for the condition that zlib is found by CMake but can't be found by pkgconfig -configure_file(libcrypto.pc.cmake.in libcrypto.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -) diff --git a/exporters/CMakeLists.txt b/exporters/CMakeLists.txt new file mode 100644 index 0000000..b81ff69 --- /dev/null +++ b/exporters/CMakeLists.txt @@ -0,0 +1,17 @@ + + +# issue: can't specify zlib path, especially for the condition that zlib is found by CMake but can't be found by pkgconfig +configure_file(pkg-config/libcrypto.pc.cmake.in libcrypto.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcrypto.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) + +configure_file(pkg-config/libssl.pc.cmake.in libssl.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libssl.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) + +configure_file(pkg-config/openssl.pc.cmake.in openssl.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openssl.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/crypto/libcrypto.pc.cmake.in b/exporters/pkg-config/libcrypto.pc.cmake.in similarity index 100% rename from crypto/libcrypto.pc.cmake.in rename to exporters/pkg-config/libcrypto.pc.cmake.in diff --git a/ssl/libssl.pc.cmake.in b/exporters/pkg-config/libssl.pc.cmake.in similarity index 100% rename from ssl/libssl.pc.cmake.in rename to exporters/pkg-config/libssl.pc.cmake.in diff --git a/apps/openssl.pc.cmake.in b/exporters/pkg-config/openssl.pc.cmake.in similarity index 100% rename from apps/openssl.pc.cmake.in rename to exporters/pkg-config/openssl.pc.cmake.in diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index 650c8b4..8a2e84f 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt @@ -135,8 +135,3 @@ install(TARGETS ssl LIBRARY ARCHIVE ) - -configure_file(libssl.pc.cmake.in libssl.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libssl.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -)