This repository has been archived by the owner on Nov 20, 2021. It is now read-only.
forked from NathanFrench/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boringssl.cmake
50 lines (38 loc) · 1.58 KB
/
boringssl.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
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
external_git_repo (boringssl
HEAD
https://boringssl.googlesource.com/boringssl)
ExternalProject_Add( ${boringssl_NAME}
PREFIX ${BUILDEM_DIR}
GIT_REPOSITORY ${boringssl_URL}
GIT_TAG ${boringssl_TAG}
UPDATE_COMMAND ""
PATCH_COMMAND ""
BUILD_IN_SOURCE 1
TEST_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STR} ${CMAKE_COMMAND} ${boringssl_SRC_DIR}
-DCMAKE_EXE_LINKER_FLAGS=-L${BUILDEM_LIB_DIR}
-DCMAKE_MODULE_LINKER_FLAGS=-L${BUILDEM_LIB_DIR}
-DCMAKE_INSTALL_PREFIX:PATH=${BUILDEM_DIR}
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
${boringssl_SRC_DIR}/include ${BUILDEM_INCLUDE_DIR}
)
ExternalProject_add_step(${boringssl_NAME} install_static_library_1
DEPENDEES install
COMMAND ${CMAKE_COMMAND} -E copy ${boringssl_SRC_DIR}/ssl/libssl.a
${BUILDEM_LIB_DIR}/ssl/libssl.a
COMMENT "install libssl.a"
)
ExternalProject_add_step(${boringssl_NAME} install_static_library_2
DEPENDEES install_static_library_1
COMMAND ${CMAKE_COMMAND} -E copy ${boringssl_SRC_DIR}/decrepit/libdecrepit.a
${BUILDEM_LIB_DIR}/decrepit/libdecrepit.a
)
ExternalProject_add_step(${boringssl_NAME} install_static_library_3
DEPENDEES install_static_library_2
COMMAND ${CMAKE_COMMAND} -E copy ${boringssl_SRC_DIR}/crypto/libcrypto.a
${BUILDEM_LIB_DIR}/crypto/libcrypto.a
)