From 02fa0eb4c606ceb38682de1bd168074041ff08ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 11 Jun 2021 23:45:08 +0800 Subject: [openssl] Add cmake wrapper to handle OPENSSL_ROOT_DIR (#18042) * [openssl] Add cmake wrapper to handle OPENSSL_ROOT_DIR * Get the abs path * update version record * apply suggestion. * Clean up openssl related code, move to openssl wrapper. * update version record * [kf5holidays] Disable parallel configure * update version record * update version record * bump version * Update versions/o-/openssl.json * update baseline * Update ports/openssl/vcpkg-cmake-wrapper.cmake * Update ports/openssl/vcpkg-cmake-wrapper.cmake * Update versions/o-/openssl.json * Update ports/openssl/vcpkg.json * Update versions/o-/openssl.json * Update ports/openssl/vcpkg.json * Update versions/o-/openssl.json * update version record --- ports/kf5holidays/portfile.cmake | 1 + ports/kf5holidays/vcpkg.json | 1 + ports/openssl/portfile.cmake | 2 +- ports/openssl/vcpkg-cmake-wrapper.cmake | 35 +++++++++++++++++++++++++++++++++ ports/openssl/vcpkg.json | 2 +- 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 ports/openssl/vcpkg-cmake-wrapper.cmake (limited to 'ports') diff --git a/ports/kf5holidays/portfile.cmake b/ports/kf5holidays/portfile.cmake index f13dee697..891b2aea1 100644 --- a/ports/kf5holidays/portfile.cmake +++ b/ports/kf5holidays/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_HTML_DOCS=OFF -DBUILD_MAN_DOCS=OFF diff --git a/ports/kf5holidays/vcpkg.json b/ports/kf5holidays/vcpkg.json index ca22f42c8..d0582f1a6 100644 --- a/ports/kf5holidays/vcpkg.json +++ b/ports/kf5holidays/vcpkg.json @@ -1,6 +1,7 @@ { "name": "kf5holidays", "version": "5.81.0", + "port-version": 1, "description": "Holiday calculation library", "dependencies": [ "ecm", diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 9b59a3c85..445bce149 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -21,5 +21,5 @@ else() include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake") endif() - +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..6ef468ee6 --- /dev/null +++ b/ports/openssl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,35 @@ +set(OPENSSL_ROOT_DIR_BAK ${OPENSSL_ROOT_DIR}) +get_filename_component(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH) +get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH) + +file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" Z_VCPKG_PROGRAMFILES) +set(Z_VCPKG_PROGRAMFILESX86_NAME "PROGRAMFILES(x86)") +file(TO_CMAKE_PATH "$ENV{${Z_VCPKG_PROGRAMFILESX86_NAME}}" Z_VCPKG_PROGRAMFILESX86) +set(CMAKE_SYSTEM_IGNORE_PATH + "${Z_VCPKG_PROGRAMFILES}/OpenSSL" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC/static" + "${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC/static" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC/static" + "${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" +) + +_find_package(${ARGS}) + +set(OPENSSL_ROOT_DIR ${OPENSSL_ROOT_DIR_BAK}) diff --git a/ports/openssl/vcpkg.json b/ports/openssl/vcpkg.json index 2d0eb1370..cd7b732c0 100644 --- a/ports/openssl/vcpkg.json +++ b/ports/openssl/vcpkg.json @@ -1,7 +1,7 @@ { "name": "openssl", "version-string": "1.1.1k", - "port-version": 4, + "port-version": 5, "description": "OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.", "homepage": "https://www.openssl.org" } -- cgit v1.2.3