Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openssl] Add cmake wrapper to handle OPENSSL_ROOT_DIR #18042

Merged
merged 24 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/kf5holidays/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ports/kf5holidays/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5holidays",
"version": "5.81.0",
"port-version": 1,
"description": "Holiday calculation library",
"dependencies": [
"ecm",
Expand Down
2 changes: 1 addition & 1 deletion ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
35 changes: 35 additions & 0 deletions ports/openssl/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
@@ -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})
2 changes: 1 addition & 1 deletion ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openssl",
"version-string": "1.1.1k",
"port-version": 2,
"port-version": 3,
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
27 changes: 0 additions & 27 deletions scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -413,33 +413,6 @@ endif()

set(VCPKG_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_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"
)

# CMAKE_EXECUTABLE_SUFFIX is not yet defined
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg.exe")
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@
},
"kf5holidays": {
"baseline": "5.81.0",
"port-version": 0
"port-version": 1
},
"kf5i18n": {
"baseline": "5.81.0",
Expand Down Expand Up @@ -4566,7 +4566,7 @@
},
"openssl": {
"baseline": "1.1.1k",
"port-version": 2
"port-version": 3
},
"openssl-unix": {
"baseline": "1.1.1h",
Expand Down
5 changes: 5 additions & 0 deletions versions/k-/kf5holidays.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "624f5c592ba2ea64dda5f8962d423165e470be7d",
"version": "5.81.0",
"port-version": 1
},
{
"git-tree": "748a3353b679c76468e85e01c3b5fa4e21351566",
"version": "5.81.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "eb471f523da25c78b54ca194807a1c43d8faeecc",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"version-string": "1.1.1k",
"port-version": 3
},
{
"git-tree": "dcaa59e72471884bf333486e49be386dd4a3da4f",
"version-string": "1.1.1k",
Expand Down