2020-04-15 08:20:24 +08:00
if ( EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h" )
2020-08-19 07:41:19 +08:00
message ( FATAL_ERROR "Can't build BoringSSL if OpenSSL is installed. Please remove OpenSSL, and try to install BoringSSL again if you need it. Build will continue since BoringSSL is a drop-in replacement for OpenSSL" )
2020-04-15 08:20:24 +08:00
endif ( )
vcpkg_find_acquire_program ( PERL )
2023-09-29 14:21:24 +08:00
get_filename_component ( PERL_EXE_PATH "${PERL}" DIRECTORY )
vcpkg_add_to_path ( "${PERL_EXE_PATH}" )
2020-04-15 08:20:24 +08:00
vcpkg_find_acquire_program ( NASM )
2023-09-29 14:21:24 +08:00
get_filename_component ( NASM_EXE_PATH "${NASM}" DIRECTORY )
vcpkg_add_to_path ( "${NASM_EXE_PATH}" )
2020-04-15 08:20:24 +08:00
vcpkg_find_acquire_program ( GO )
2023-09-29 14:21:24 +08:00
get_filename_component ( GO_EXE_PATH "${GO}" DIRECTORY )
vcpkg_add_to_path ( "${GO_EXE_PATH}" )
2020-04-15 08:20:24 +08:00
vcpkg_from_github (
O U T _ S O U R C E _ P A T H S O U R C E _ P A T H
R E P O g o o g l e / b o r i n g s s l
2023-09-29 14:21:24 +08:00
R E F c f c b 9 5 4 9 0 1 e 2 6 4 e d b 9 9 1 5 e 5 0 1 d e 6 4 a 8 1 7 3 2 c 5 e d d
S H A 5 1 2 6 f c 7 f f f 2 4 c 8 5 e d 5 8 0 f b 3 6 2 f 7 8 8 b 2 1 6 e f 0 4 c a 1 6 9 7 6 6 5 6 c 6 8 c 7 5 d 3 f d 7 2 c 8 4 e 2 8 e d 3 9 a 3 a b 8 f c b 0 6 4 b 7 c 7 0 6 1 f 9 3 a 4 d 3 7 d 5 4 2 6 e 3 6 d 2 5 9 e 1 7 1 4 f a 6 2 d 9 0 b 9 9 6 5 9 a 3 d d c 2
2020-04-15 08:20:24 +08:00
H E A D _ R E F m a s t e r
P A T C H E S
2023-09-29 14:21:24 +08:00
0 0 0 1 - s t a t i c - g t e s t . p a t c h
2022-06-03 03:55:46 +08:00
0 0 0 2 - r e m o v e - W X - W e r r o r . p a t c h
2023-09-29 14:21:24 +08:00
0 0 0 3 - f i x - s h a r e d - s y m b o l - v i s i b i l i t y . p a t c h
2020-04-15 08:20:24 +08:00
)
2023-10-14 02:06:57 +08:00
if ( VCPKG_TARGET_IS_WINDOWS )
# the FindOpenSSL.cmake script differentiates debug and release binaries using this suffix.
set ( CMAKE_CONFIGURE_OPTIONS_DEBUG "-DCMAKE_DEBUG_POSTFIX=d" )
endif ( )
2022-06-03 03:55:46 +08:00
vcpkg_cmake_configure (
S O U R C E _ P A T H " $ { S O U R C E _ P A T H } "
2020-04-15 08:20:24 +08:00
O P T I O N S _ D E B U G
2023-10-14 02:06:57 +08:00
$ { C M A K E _ C O N F I G U R E _ O P T I O N S _ D E B U G }
2020-04-15 08:20:24 +08:00
)
2022-06-03 03:55:46 +08:00
vcpkg_cmake_install ( )
2023-05-18 00:21:23 +08:00
vcpkg_copy_pdbs ( )
2023-09-29 14:21:24 +08:00
vcpkg_cmake_config_fixup ( PACKAGE_NAME OpenSSL CONFIG_PATH lib/cmake/OpenSSL )
2020-04-15 08:20:24 +08:00
2023-09-29 14:21:24 +08:00
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" )
vcpkg_copy_tools ( TOOL_NAMES bssl AUTO_CLEAN )
if ( VCPKG_LIBRARY_LINKAGE STREQUAL "static" )
file ( REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin" )
2020-04-15 08:20:24 +08:00
endif ( )
2023-09-29 14:21:24 +08:00
include ( "${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake" )
2023-05-18 00:21:23 +08:00
file ( INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" )
vcpkg_install_copyright ( FILE_LIST "${SOURCE_PATH}/LICENSE" )