Use 64 bit openssl on Mac

This commit is contained in:
Jerry (Xinyu Hou) 2016-12-29 14:56:34 +00:00 committed by Andrew Nelless
parent 84c8c891af
commit c79759115b
1 changed files with 6 additions and 4 deletions

View File

@ -174,7 +174,7 @@ if (UNIX)
CACHE STRING "" FORCE)
else()
# >= 10.6: Intel only
set(CMAKE_OSX_ARCHITECTURES "i386"
set(CMAKE_OSX_ARCHITECTURES "x86_64"
CACHE STRING "" FORCE)
endif()
@ -333,7 +333,8 @@ endif()
if (APPLE)
set(OPENSSL_PLAT_DIR openssl-osx)
set(OPENSSL_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/include)
set(OPENSSL_ARCH_DIR x86_64)
set(OPENSSL_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/${OPENSSL_ARCH_DIR}/include)
endif()
if (WIN32)
@ -345,9 +346,10 @@ endif()
if (UNIX)
if (APPLE)
set(OPENSSL_ARCH_DIR x86_64)
set(OPENSSL_LIBS
${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libssl.a
${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/libcrypto.a
${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/${OPENSSL_ARCH_DIR}/libssl.a
${CMAKE_CURRENT_SOURCE_DIR}/ext/${OPENSSL_PLAT_DIR}/${OPENSSL_ARCH_DIR}/libcrypto.a
)
else()
set(OPENSSL_LIBS ssl crypto)