forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (44 loc) · 1.8 KB
/
CMakeLists.txt
File metadata and controls
57 lines (44 loc) · 1.8 KB
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
53
54
55
56
57
project(System.Net.Security.Native C)
if(CLR_CMAKE_TARGET_ARCH_WASM)
message(FATAL_ERROR "Not implemented for WASM")
endif()
add_compile_options(-Wno-incompatible-pointer-types-discards-qualifiers)
include(${CMAKE_CURRENT_LIST_DIR}/extra_libs.cmake)
set(NATIVE_LIBS_EXTRA)
append_extra_security_libs(NATIVE_LIBS_EXTRA)
set(NATIVEGSS_SOURCES
pal_gssapi.c
)
if (GEN_SHARED_LIB)
add_library(System.Net.Security.Native
SHARED
${NATIVEGSS_SOURCES}
${VERSION_FILE_PATH}
)
endif()
if (NOT GEN_SHARED_LIB AND NOT CLR_CMAKE_TARGET_APPLE_MOBILE AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
set(NATIVEGSS_SOURCES ${NATIVEGSS_SOURCES} entrypoints.c)
endif()
add_library(System.Net.Security.Native-Static
STATIC
${NATIVEGSS_SOURCES}
)
set_target_properties(System.Net.Security.Native-Static PROPERTIES OUTPUT_NAME System.Net.Security.Native CLEAN_DIRECT_OUTPUT 1)
if (GEN_SHARED_LIB)
target_link_libraries(System.Net.Security.Native
PRIVATE
${NATIVE_LIBS_EXTRA}
)
if (NOT CLR_CMAKE_TARGET_APPLE_MOBILE AND NOT CLR_CMAKE_TARGET_ANDROID AND NOT CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CMAKE_TARGET_WASI)
add_custom_command(TARGET System.Net.Security.Native POST_BUILD
COMMENT "Verifying System.Net.Security.Native entry points against entrypoints.c "
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../verify-entrypoints.sh
$<TARGET_FILE:System.Net.Security.Native>
${CMAKE_CURRENT_SOURCE_DIR}/entrypoints.c
${CMAKE_NM}
VERBATIM
)
endif()
install_with_stripped_symbols (System.Net.Security.Native PROGRAMS .)
endif()
install (TARGETS System.Net.Security.Native-Static DESTINATION ${STATIC_LIB_DESTINATION} COMPONENT libs)