-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use VCPKG_OVERLAY_PORTS overlay openssl 1.1
- Loading branch information
Showing
17 changed files
with
1,325 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,274 @@ | ||
{ | ||
"version": 7, | ||
|
||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 27, | ||
"patch": 0 | ||
}, | ||
|
||
"configurePresets": [ | ||
{ | ||
"name": "vcpkg", | ||
"description": "Configure with vcpkg. please set VCPKG_ROOT environment first", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE": { | ||
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", | ||
"type": "FILEPATH" | ||
}, | ||
"VCPKG_VERBOSE": "ON", | ||
"X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "base", | ||
"hidden": true, | ||
"inherits": "vcpkg", | ||
"cacheVariables": { | ||
"BUILD_FREERDP": "ON", | ||
"CMARK_SHARED": "OFF", | ||
"CMARK_TESTS": "OFF", | ||
"CMARK_STATIC": "ON", | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "openssl1.1", | ||
"description": "Versions earlier than QT6.5 use OpenSSL 1.1", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"VCPKG_OVERLAY_PORTS": { | ||
"value": "${sourceDir}/vcpkg/ports", | ||
"type": "FILEPATH" | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
"name": "qt6", | ||
"inherits": [ | ||
"base" | ||
], | ||
"cacheVariables": { | ||
"QT_ROOT": { | ||
"value": "$env{Qt6_DIR}", | ||
"type": "PATH" | ||
}, | ||
"Qt6_DIR": { | ||
"value": "$env{Qt6_DIR}", | ||
"type": "PATH" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "qt5", | ||
"description": "Versions earlier than QT6.5 use OpenSSL 1.1", | ||
"inherits": [ | ||
"base", | ||
"openssl1.1" | ||
], | ||
"cacheVariables": { | ||
"QT_ROOT": { | ||
"value": "$env{Qt5_DIR}", | ||
"type": "PATH" | ||
}, | ||
"Qt5_DIR": { | ||
"value": "$env{Qt5_DIR}", | ||
"type": "PATH" | ||
} | ||
} | ||
}, | ||
|
||
{ | ||
"name": "x64", | ||
"hidden": true, | ||
"binaryDir": "build/x64", | ||
"architecture": { | ||
"value": "x64" | ||
} | ||
}, | ||
{ | ||
"name": "x86", | ||
"hidden": true, | ||
"binaryDir": "build/x86", | ||
"architecture": { | ||
"value": "Win32" | ||
} | ||
}, | ||
|
||
{ | ||
"name": "msvc", | ||
"hidden": true, | ||
"generator": "Visual Studio 17 2022", | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-x64-qt6", | ||
"inherits": [ | ||
"msvc", | ||
"qt6", | ||
"x64" | ||
] | ||
}, | ||
{ | ||
"name": "msvc-x86-qt6", | ||
"inherits": [ | ||
"msvc", | ||
"qt6", | ||
"x86" | ||
] | ||
}, | ||
{ | ||
"name": "msvc-x64-qt5", | ||
"inherits": [ | ||
"msvc", | ||
"qt5", | ||
"x64" | ||
] | ||
}, | ||
{ | ||
"name": "msvc-x86-qt5", | ||
"inherits": [ | ||
"msvc", | ||
"qt5", | ||
"x86" | ||
] | ||
}, | ||
|
||
{ | ||
"name": "ninja", | ||
"hidden": true, | ||
"generator": "Ninja" | ||
}, | ||
{ | ||
"name": "ninja-x64-qt6", | ||
"inherits": [ | ||
"ninja", | ||
"qt6", | ||
"x64" | ||
] | ||
}, | ||
{ | ||
"name": "ninja-x86-qt6", | ||
"inherits": [ | ||
"ninja", | ||
"qt6", | ||
"x86" | ||
] | ||
}, | ||
{ | ||
"name": "ninja-x64-qt5", | ||
"inherits": [ | ||
"ninja", | ||
"qt5", | ||
"x64" | ||
] | ||
}, | ||
{ | ||
"name": "ninja-x86-qt5", | ||
"inherits": [ | ||
"ninja", | ||
"qt5", | ||
"x86" | ||
] | ||
} | ||
], | ||
|
||
"buildPresets": [ | ||
{ | ||
"name": "msvc-x64-qt6", | ||
"configurePreset": "msvc-x64-qt6", | ||
"configuration": "Release", | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-x86-qt6", | ||
"configurePreset": "msvc-x86-qt6", | ||
"configuration": "Release", | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-x64-qt5", | ||
"configurePreset": "msvc-x64-qt5", | ||
"configuration": "Release", | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-x86-qt5", | ||
"configurePreset": "msvc-x86-qt5", | ||
"configuration": "Release", | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
|
||
{ | ||
"name": "ninja-x64-qt6", | ||
"configurePreset": "ninja-x64-qt6", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ninja-x86-qt6", | ||
"configurePreset": "ninja-x86-qt6", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ninja-x64-qt5", | ||
"configurePreset": "ninja-x64-qt5", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ninja-x86-qt5", | ||
"configurePreset": "ninja-x86-qt5", | ||
"configuration": "Release" | ||
} | ||
], | ||
|
||
"workflowPresets": [ | ||
{ | ||
"name": "msvc-x64-qt6", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "msvc-x64-qt6" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "msvc-x64-qt6" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "msvc-x86-qt6", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "msvc-x86-qt6" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "msvc-x86-qt6" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
function(install_pc_file name pc_data) | ||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") | ||
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${name}.pc" @ONLY) | ||
endif() | ||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") | ||
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${name}.pc" @ONLY) | ||
endif() | ||
endfunction() | ||
|
||
install_pc_file(openssl [[ | ||
Name: OpenSSL | ||
Description: Secure Sockets Layer and cryptography libraries and tools | ||
Requires: libssl libcrypto | ||
]]) | ||
|
||
install_pc_file(libssl [[ | ||
Name: OpenSSL-libssl | ||
Description: Secure Sockets Layer and cryptography libraries | ||
Libs: -L"${libdir}" -llibssl | ||
Requires: libcrypto | ||
Cflags: -I"${includedir}" | ||
]]) | ||
|
||
install_pc_file(libcrypto [[ | ||
Name: OpenSSL-libcrypto | ||
Description: OpenSSL cryptography library | ||
Libs: -L"${libdir}" -llibcrypto | ||
Libs.private: -lcrypt32 -lws2_32 | ||
Cflags: -I"${includedir}" | ||
]]) | ||
|
||
vcpkg_fixup_pkgconfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
prefix=${pcfiledir}/../.. | ||
exec_prefix=${prefix} | ||
libdir=${exec_prefix}/lib | ||
includedir=${prefix}/include | ||
Version: @OPENSSL_VERSION@ | ||
@pc_data@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") | ||
message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") | ||
endif() | ||
|
||
set(OPENSSL_VERSION 1.1.1n) | ||
vcpkg_download_distfile( | ||
ARCHIVE | ||
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" | ||
FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" | ||
SHA512 1937796736613dcf4105a54e42ecb61f95a1cea74677156f9459aea0f2c95159359e766089632bf364ee6b0d28d661eb9957bce8fecc9d2436378d8d79e8d0a4 | ||
) | ||
|
||
vcpkg_find_acquire_program(PERL) | ||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) | ||
vcpkg_add_to_path("${PERL_EXE_PATH}") | ||
|
||
if(VCPKG_TARGET_IS_UWP) | ||
include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake") | ||
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake") | ||
elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) | ||
include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake") | ||
include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake") | ||
else() | ||
include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake") | ||
endif() | ||
|
||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") |
Oops, something went wrong.