2019-05-03 13:57:43 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
2016-11-04 20:09:13 +08:00
|
|
|
|
2016-11-08 13:54:23 +08:00
|
|
|
if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(FATAL_ERROR "This portfile only supports UWP")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
2016-11-04 20:09:13 +08:00
|
|
|
set(UWP_PLATFORM "arm")
|
2016-11-08 13:54:23 +08:00
|
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
2016-11-04 20:09:13 +08:00
|
|
|
set(UWP_PLATFORM "x64")
|
2016-11-08 13:54:23 +08:00
|
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
2016-11-04 20:09:13 +08:00
|
|
|
set(UWP_PLATFORM "Win32")
|
|
|
|
else ()
|
2016-11-08 13:54:23 +08:00
|
|
|
message(FATAL_ERROR "Unsupported architecture")
|
2016-11-04 20:09:13 +08:00
|
|
|
endif()
|
|
|
|
|
2017-08-02 08:12:59 +08:00
|
|
|
vcpkg_find_acquire_program(PERL)
|
2017-06-08 17:15:58 +08:00
|
|
|
vcpkg_find_acquire_program(JOM)
|
|
|
|
get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY)
|
2016-11-04 20:09:13 +08:00
|
|
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
2017-06-08 17:15:58 +08:00
|
|
|
set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}")
|
2016-11-04 20:09:13 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_from_github(
|
2019-01-11 09:05:54 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-05-03 13:57:43 +08:00
|
|
|
REPO Microsoft/openssl
|
2019-05-22 12:00:24 +08:00
|
|
|
REF OpenSSL_1_0_2r_WinRT
|
|
|
|
SHA512 3045693fca4b042b69675f6164d8cc82106582cf31081d65a0adbd528f04e77fa48b3761f3be7bdf8ab962a093b28fec0ae6d7da02058f2b049f79b784c39c2e
|
2019-05-03 13:57:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2019-01-11 09:05:54 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-uwp-rs4.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-uwp-configure-unicode.patch
|
2018-06-01 01:04:01 +08:00
|
|
|
)
|
|
|
|
|
2016-11-08 21:40:16 +08:00
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
|
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
|
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)
|
2016-11-04 20:09:13 +08:00
|
|
|
|
2017-08-24 13:15:02 +08:00
|
|
|
file(
|
|
|
|
COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
|
|
|
|
DESTINATION ${SOURCE_PATH}
|
|
|
|
)
|
2016-11-04 20:09:13 +08:00
|
|
|
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET}")
|
|
|
|
vcpkg_execute_required_process(
|
2017-08-24 13:15:02 +08:00
|
|
|
COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM}
|
2016-11-04 20:09:13 +08:00
|
|
|
WORKING_DIRECTORY ${SOURCE_PATH}
|
|
|
|
LOGNAME make-openssl-${TARGET_TRIPLET}
|
|
|
|
)
|
|
|
|
message(STATUS "Build ${TARGET_TRIPLET} done")
|
|
|
|
|
|
|
|
file(
|
|
|
|
COPY ${SOURCE_PATH}/inc32/openssl
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
|
|
|
)
|
|
|
|
|
2017-08-24 13:15:02 +08:00
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.dll
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.pdb
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.dll
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.pdb
|
2016-11-04 20:09:13 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
|
2017-08-24 13:15:02 +08:00
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.lib
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.lib
|
2016-11-04 20:09:13 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
|
2017-08-24 13:15:02 +08:00
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.dll
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.pdb
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.dll
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.pdb
|
2016-11-04 20:09:13 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
2017-08-24 13:15:02 +08:00
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/out32dll/libeay32.lib
|
|
|
|
${SOURCE_PATH}/out32dll/ssleay32.lib
|
2016-11-04 20:09:13 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
|
2018-07-18 07:07:52 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2017-11-17 15:54:55 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
2018-08-31 08:07:14 +08:00
|
|
|
|
|
|
|
vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE)
|