mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[libressl] Fail if openssl is installed (#40924)
This commit is contained in:
parent
1c9985b48b
commit
86fba13068
@ -1,7 +1,5 @@
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h")
|
||||
message(WARNING "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it. Build will continue since libressl is a subset of openssl")
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
return()
|
||||
message(FATAL_ERROR "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it.")
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "libressl",
|
||||
"version": "3.9.2",
|
||||
"port-version": 1,
|
||||
"description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.",
|
||||
"license": "ISC",
|
||||
"dependencies": [
|
||||
|
4
scripts/test_ports/vcpkg-ci-libressl/portfile.cmake
Normal file
4
scripts/test_ports/vcpkg-ci-libressl/portfile.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
|
||||
vcpkg_cmake_build()
|
33
scripts/test_ports/vcpkg-ci-libressl/project/CMakeLists.txt
Normal file
33
scripts/test_ports/vcpkg-ci-libressl/project/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(libressl-test CXX)
|
||||
|
||||
# libressl promises openssl compatibility
|
||||
# NB: The port doesn't provide a wrapper, so there is no support
|
||||
# for multi-config and for transitive usage requirements.
|
||||
find_package(OpenSSL MODULE REQUIRED)
|
||||
foreach(target IN ITEMS OpenSSL::SSL OpenSSL::Crypto)
|
||||
set(location_found FALSE)
|
||||
foreach(property IN ITEMS IMPORTED_LOCATION IMPORTED_LOCATION_DEBUG IMPORTED_LOCATION_RELEASE)
|
||||
get_target_property(location ${target} ${property})
|
||||
if(NOT location)
|
||||
continue()
|
||||
endif()
|
||||
set(location_found TRUE)
|
||||
message(STATUS "${target} ${property}: ${location}")
|
||||
string(FIND "${location}" "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" index)
|
||||
if(NOT index STREQUAL "0")
|
||||
message(SEND_ERROR "${target} ${property} is not from vcpkg.")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT location_found)
|
||||
message(SEND_ERROR "No location for ${target} binary")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# libressl provides cmake config
|
||||
find_package(LibreSSL CONFIG REQUIRED)
|
||||
message(STATUS "LibreSSL CONFIG: ${LibreSSL_DIR}")
|
||||
string(FIND "${LibreSSL_DIR}" "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" index)
|
||||
if(NOT index STREQUAL "0")
|
||||
message(SEND_ERROR "LibreSSL CONFIG is not from vcpkg.")
|
||||
endif()
|
12
scripts/test_ports/vcpkg-ci-libressl/vcpkg.json
Normal file
12
scripts/test_ports/vcpkg-ci-libressl/vcpkg.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "vcpkg-ci-libressl",
|
||||
"version-string": "ci",
|
||||
"description": "Validates libressl",
|
||||
"dependencies": [
|
||||
"libressl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -4986,7 +4986,7 @@
|
||||
},
|
||||
"libressl": {
|
||||
"baseline": "3.9.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"librsvg": {
|
||||
"baseline": "2.40.20",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "f9e56b0af8f93ed5c5adc5e2ba1696e5c16420be",
|
||||
"version": "3.9.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "212859e945d993b860716eaa47b8f83ef52efbb2",
|
||||
"version": "3.9.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user