aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPark DongHa <luncliff@gmail.com>2020-08-25 13:20:02 +0900
committerGitHub <noreply@github.com>2020-08-24 21:20:02 -0700
commit6ed0bc982bf9bdca25439d538f7f272786a7af4d (patch)
tree938e6ef675e0029ecf876170491c77a81c720b26
parent1f52fbaa04dab7e769818dfce7e4e9aa329bb406 (diff)
downloadvcpkg-6ed0bc982bf9bdca25439d538f7f272786a7af4d.tar.gz
vcpkg-6ed0bc982bf9bdca25439d538f7f272786a7af4d.zip
[openssl-unix] use xcrun for iOS triplet build (#12527)
* [openssl] use xcrun for iOS triplet build * config for iOS simulator architecture * use .dylib suffix for iOS shared is used * [openssl-unix] increase port version in CONTROL * Update CONTROL * [openssl-unix] update port version * prevent collision with #12544 * [openssl-unix] make disable platform specific * [openssl-unix] replace set to list(APPEND) Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
-rw-r--r--ports/openssl-unix/CMakeLists.txt18
-rw-r--r--ports/openssl-unix/CONTROL2
2 files changed, 18 insertions, 2 deletions
diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt
index a763a8749..7e09222c9 100644
--- a/ports/openssl-unix/CMakeLists.txt
+++ b/ports/openssl-unix/CMakeLists.txt
@@ -11,6 +11,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
else()
set(PLATFORM linux-generic32)
endif()
+elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
+ set(PLATFORM ios64-xcrun)
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
+ set(PLATFORM ios-xcrun)
+ elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" OR
+ VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
+ set(PLATFORM iossimulator-xcrun)
+ else()
+ message(FATAL_ERROR "Unknown iOS target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
+ endif()
+ # disable that makes linkage error (e.g. require stderr usage)
+ list(APPEND DISABLES no-stdio no-ui no-asm)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(PLATFORM darwin64-x86_64-cc)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
@@ -79,7 +92,7 @@ if(BUILD_SHARED_LIBS)
REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*")
string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1"
SHLIB_VERSION "${SHLIB_VERSION}")
- if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(LIB_EXT dylib)
set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT})
elseif(MINGW)
@@ -118,6 +131,8 @@ else()
set(PATH_VAR ":$ENV{PATH}")
endif()
+
+
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
@@ -138,6 +153,7 @@ add_custom_command(
no-seed
no-md2
no-tests
+ ${DISABLES}
${PLATFORM}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=/etc/ssl"
diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL
index 9ea5cc309..9c28728ff 100644
--- a/ports/openssl-unix/CONTROL
+++ b/ports/openssl-unix/CONTROL
@@ -1,5 +1,5 @@
Source: openssl-unix
Version: 1.1.1g
-Port-Version: 3
+Port-Version: 4
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.
Supports: !(windows|uwp)