This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
openssl.cmake
52 lines (43 loc) · 1.51 KB
/
openssl.cmake
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# Install openssl from source
#
if (NOT openssl_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (zlib)
external_source (openssl
1.0.1i
openssl-1.0.1i.tar.gz
c8dc151a671b9b92ff3e4c118b174972
http://www.openssl.org/source)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# On Mac, 64-bit builds must be manually requested.
set (SSL_CONFIGURE_COMMAND ./Configure darwin64-x86_64-cc )
else()
# The config script seems to auto-select the platform correctly on linux
# It calls ./Configure for us.
set (SSL_CONFIGURE_COMMAND ./config)
endif()
message ("Installing ${openssl_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${openssl_NAME}
DEPENDS ${zlib_NAME}
PREFIX ${BUILDEM_DIR}
URL ${openssl_URL}
URL_MD5 ${openssl_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${SSL_CONFIGURE_COMMAND}
--prefix=${BUILDEM_DIR}
-I${BUILDEM_INCLUDE_DIR}
-L${BUILDEM_LIB_DIR}
shared
zlib
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -j1 # Parallel builds on openssl are thoroughly broken. Force -j1
BUILD_IN_SOURCE 1
TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -j1 test
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -j1 install
)
set_target_properties(${openssl_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT openssl_NAME)