随笔 - 363  文章 - 0 评论 - 35 阅读 - 39万
< 2025年1月 >
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1
2 3 4 5 6 7 8

1 下载源代码

git clone https://github.com/pol51/OpenSSL-CMake.git

cd OpenSSL-CMake

mkdir build && cd build

pico build.sh 内容如下两行

cmake -GXcode ..

xcodebuild -project openssl.xcodeproj -alltargets -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -configuration Release

CMakeList。txt加入

include(cmake/iOS_64.cmake)

 

cmake/iOS_64.cmake内容如下

set (CMAKE_IOS_DEVELOPER_ROOT /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/)

set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)

 

set(CMAKE_CXX_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++)

set (CMAKE_C_FLAGS "-I/Users/tom/Documents/source/OpenSSL-CMake-maste -I/Users/tom/Documents/source/OpenSSL-CMake-master/build/ssl/")

set (CMAKE_CXX_FLAGS "-I/Users/tom/Documents/source/OpenSSL-CMake-maste -I/Users/tom/Documents/source/OpenSSL-CMake-master/build/ssl/ -headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")

set(CMAKE_OSX_ARCHITECTURES arm64)

 

posted on   袁晓平  阅读(819)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示