Skip to content

Instantly share code, notes, and snippets.

View Shunzi007's full-sized avatar

Shun Shunzi007

View GitHub Profile
-- Toolchain using default iOS SDK: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
-- The C compiler identification is AppleClang 9.0.0.9000039
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- Performing Test check_c_compiler_flag__Wno_error_deprecated_declarations
-- Performing Test check_c_compiler_flag__Wno_error_deprecated_declarations - Failed
@Shunzi007
Shunzi007 / ios.cmake
Created February 7, 2018 07:46
ios.cmake
set (CMAKE_SYSTEM_NAME Darwin)
set (CMAKE_SYSTEM_VERSION 1)
set (UNIX True)
set (APPLE True)
set (IOS True)
# Required as of cmake 2.8.10
set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
# Determine the cmake host system version so we know where to find the iOS SDKs
set (CMAKE_SYSTEM_NAME Darwin)
set (CMAKE_SYSTEM_VERSION 1)
set (UNIX True)
set (APPLE True)
set (IOS True)
# Required as of cmake 2.8.10
set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
# Determine the cmake host system version so we know where to find the iOS SDKs
@Shunzi007
Shunzi007 / gist:12d4600c8d5b59fb7f1057d2f896136c
Created February 5, 2018 02:13
find /usr/local/Cellar/openssl/1.0.2n/
Last login: Mon Feb 5 10:10:50 on ttys007
➜ ~ find /usr/local/Cellar/openssl/1.0.2n/
/usr/local/Cellar/openssl/1.0.2n/
/usr/local/Cellar/openssl/1.0.2n//INSTALL_RECEIPT.json
/usr/local/Cellar/openssl/1.0.2n//LICENSE
/usr/local/Cellar/openssl/1.0.2n//bin
/usr/local/Cellar/openssl/1.0.2n//bin/c_rehash
/usr/local/Cellar/openssl/1.0.2n//bin/openssl
/usr/local/Cellar/openssl/1.0.2n//.brew
/usr/local/Cellar/openssl/1.0.2n//.brew/openssl.rb
cmake -DCMAKE_TOOLCHAIN_FILE=./ios.cmake -DIOS_PLATFORM=OS -H. -BXcode -GXcode -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2n -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2n/lib --trace
Running with trace output on.
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(1): cmake_minimum_required(VERSION 3.7 )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(3): set(DEVELOPMENT_PROJECT_NAME ios-cmake )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(4): set(DEVELOPMENT_TEAM_ID H44ZSTMC6S )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(5): set(APP_NAME ios-cmake )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(6): set(APP_BUNDLE_IDENTIFIER wangshun.ios-cmake )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(7): set(FRAMEWORK_NAME FooBar )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(8): set(FRAMEWORK_BUNDLE_IDENTIFIER wangshun.FooBar )
/Users/wangshun/Code/ios-cmake/CMakeLists.txt(9): set(TEST_NAME Tests )
@Shunzi007
Shunzi007 / gist:7a45b4d848317eedd1e5b252aced43c8
Created February 4, 2018 16:10
Error of libevent cmake
-- Looking for _GNU_SOURCE
-- Looking for _GNU_SOURCE - not found
-- Looking for CTL_KERN - found
-- Looking for KERN_ARND - not found
-- Looking for KERN_RANDOM - not found
-- Looking for RANDOM_UUID - not found
-- Checking if kqueue works with pipes...
CMake Error at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)