Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7f2f5fa

Browse files
bartonjsnguerrera
authored andcommitted
Move System.Security.Cryptography.Native to corefx repo
1 parent eacdd5d commit 7f2f5fa

File tree

2 files changed

+810
-0
lines changed

2 files changed

+810
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
project(System.Security.Cryptography.Native)
3+
4+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
5+
6+
add_definitions(-DPIC=1)
7+
add_definitions(-DBIT64=1)
8+
9+
find_library(CRYPTO NAMES crypto)
10+
if(CRYPTO STREQUAL CRYPTO-NOTFOUND)
11+
message(WARNING "Cannot find libcrypto, skipping build for System.Security.Cryptography.Native. .NET cryptography is not expected to function. Try installing libssl-dev (or the appropriate package for your platform)")
12+
return()
13+
endif()
14+
15+
add_compile_options(-fPIC)
16+
17+
set(NATIVECRYPTO_SOURCES
18+
openssl.c
19+
)
20+
21+
add_library(System.Security.Cryptography.Native
22+
SHARED
23+
${NATIVECRYPTO_SOURCES}
24+
)
25+
26+
# Disable the "lib" prefix.
27+
set_target_properties(System.Security.Cryptography.Native PROPERTIES PREFIX "")
28+
29+
target_link_libraries(System.Security.Cryptography.Native
30+
${CRYPTO}
31+
)
32+
33+
install (TARGETS System.Security.Cryptography.Native DESTINATION .)

0 commit comments

Comments
 (0)