Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/cmnghttp2/CMakeLists.txt
3148 views
1
# Disable warnings to avoid changing 3rd party code.
2
if(CMAKE_C_COMPILER_ID MATCHES
3
"^(GNU|LCC|Clang|AppleClang|IBMClang|XLClang|XL|VisualAge|SunPro|HP|Intel|IntelLLVM|NVHPC)$")
4
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
5
elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale")
6
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall")
7
endif()
8
9
# Re-use some check result cache entries from cmcurl:
10
# * HAVE_ARPA_INET_H (referenced in cmakeconfig.h.in)
11
# * HAVE_NETINET_IN_H (referenced in cmakeconfig.h.in)
12
# * HAVE_SIZEOF_SSIZE_T (referenced here)
13
if(NOT HAVE_SIZEOF_SSIZE_T)
14
set(ssize_t KWIML_INT_intptr_t)
15
endif()
16
configure_file(cmakeconfig.h.in config.h)
17
18
add_library(cmnghttp2 STATIC
19
lib/nghttp2_buf.c
20
lib/nghttp2_callbacks.c
21
lib/nghttp2_debug.c
22
lib/nghttp2_extpri.c
23
lib/nghttp2_frame.c
24
lib/nghttp2_hd.c
25
lib/nghttp2_hd_huffman.c
26
lib/nghttp2_hd_huffman_data.c
27
lib/nghttp2_helper.c
28
lib/nghttp2_http.c
29
lib/nghttp2_map.c
30
lib/nghttp2_mem.c
31
lib/nghttp2_npn.c
32
lib/nghttp2_option.c
33
lib/nghttp2_outbound_item.c
34
lib/nghttp2_pq.c
35
lib/nghttp2_priority_spec.c
36
lib/nghttp2_queue.c
37
lib/nghttp2_rcbuf.c
38
lib/nghttp2_session.c
39
lib/nghttp2_stream.c
40
lib/nghttp2_submit.c
41
lib/nghttp2_version.c
42
)
43
44
target_compile_definitions(cmnghttp2
45
PUBLIC NGHTTP2_STATICLIB
46
PRIVATE HAVE_CONFIG_H
47
)
48
target_include_directories(cmnghttp2 PRIVATE
49
${CMAKE_CURRENT_BINARY_DIR}
50
${CMAKE_CURRENT_SOURCE_DIR}/lib/includes
51
)
52
53
install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmnghttp2)
54
55