diff options
author | Brad King <brad.king@kitware.com> | 2020-04-06 12:19:51 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-06 12:20:01 (GMT) |
commit | 5ded334ee1f8befa6f7df1e2179d17a9b42e9060 (patch) | |
tree | 6a67c79974f50e434fa709dfc37359e014a492ac /Utilities/cmnghttp2/CMakeLists.txt | |
parent | 0b015308678e212206a4ed3afc50cabc89f25729 (diff) | |
parent | 02dd24a9289c32808696c4cde7aa37d2255f42d4 (diff) | |
download | CMake-5ded334ee1f8befa6f7df1e2179d17a9b42e9060.zip CMake-5ded334ee1f8befa6f7df1e2179d17a9b42e9060.tar.gz CMake-5ded334ee1f8befa6f7df1e2179d17a9b42e9060.tar.bz2 |
Merge topic 'curl-http2'
02dd24a928 curl: Enable HTTP/2 support by using nghttp2
a24dd93e93 curl: When building inside CMake, link dependencies as PRIVATE
0b872fd4be nghttp2: Build the library within CMake for use by our curl
cd5a320d68 Merge branch 'upstream-nghttp2' into curl-http2
5dc6921805 nghttp2 2019-11-15 (cc05c5fe)
1b8e2c2a3d nghttp2: Add script to import from upstream
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4560
Diffstat (limited to 'Utilities/cmnghttp2/CMakeLists.txt')
-rw-r--r-- | Utilities/cmnghttp2/CMakeLists.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Utilities/cmnghttp2/CMakeLists.txt b/Utilities/cmnghttp2/CMakeLists.txt new file mode 100644 index 0000000..3a11ace --- /dev/null +++ b/Utilities/cmnghttp2/CMakeLists.txt @@ -0,0 +1,52 @@ +# Disable warnings to avoid changing 3rd party code. +if(CMAKE_C_COMPILER_ID MATCHES + "^(GNU|Clang|AppleClang|XLClang|XL|VisualAge|SunPro|HP|Intel)$") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") +elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall") +endif() + +# Re-use some check result cache entries from cmcurl: +# * HAVE_ARPA_INET_H +# * HAVE_NETINET_IN_H +# * HAVE_SSIZE_T +if(NOT HAVE_SSIZE_T) + set(ssize_t KWIML_INT_intptr_t) +endif() +configure_file(cmakeconfig.h.in config.h) + +add_library(cmnghttp2 STATIC + lib/nghttp2_buf.c + lib/nghttp2_callbacks.c + lib/nghttp2_debug.c + lib/nghttp2_frame.c + lib/nghttp2_hd.c + lib/nghttp2_hd_huffman.c + lib/nghttp2_hd_huffman_data.c + lib/nghttp2_helper.c + lib/nghttp2_http.c + lib/nghttp2_map.c + lib/nghttp2_mem.c + lib/nghttp2_npn.c + lib/nghttp2_option.c + lib/nghttp2_outbound_item.c + lib/nghttp2_pq.c + lib/nghttp2_priority_spec.c + lib/nghttp2_queue.c + lib/nghttp2_rcbuf.c + lib/nghttp2_session.c + lib/nghttp2_stream.c + lib/nghttp2_submit.c + lib/nghttp2_version.c + ) + +target_compile_definitions(cmnghttp2 + PUBLIC NGHTTP2_STATICLIB + PRIVATE HAVE_CONFIG_H + ) +target_include_directories(cmnghttp2 PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/lib/includes + ) + +install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmnghttp2) |