diff options
author | James M Snell <jasnell@gmail.com> | 2017-07-17 10:15:34 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-08-04 12:55:39 -0700 |
commit | 71a1876f6c3f2a7131c7019d63fea5c8fa740276 (patch) | |
tree | f0d057144429a4219a6c80359676e6c89116c76a /deps/nghttp2/lib/CMakeLists.txt | |
parent | b1909d3a70f9e2ab3d1871848814edbe6130a00e (diff) | |
download | android-node-v8-71a1876f6c3f2a7131c7019d63fea5c8fa740276.tar.gz android-node-v8-71a1876f6c3f2a7131c7019d63fea5c8fa740276.tar.bz2 android-node-v8-71a1876f6c3f2a7131c7019d63fea5c8fa740276.zip |
deps: add nghttp2 dependency
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/nghttp2/lib/CMakeLists.txt')
-rw-r--r-- | deps/nghttp2/lib/CMakeLists.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/deps/nghttp2/lib/CMakeLists.txt b/deps/nghttp2/lib/CMakeLists.txt new file mode 100644 index 0000000000..7ef37ed85c --- /dev/null +++ b/deps/nghttp2/lib/CMakeLists.txt @@ -0,0 +1,63 @@ +add_subdirectory(includes) + +include_directories( + "${CMAKE_CURRENT_SOURCE_DIR}/includes" + "${CMAKE_CURRENT_BINARY_DIR}/includes" +) + +add_definitions(-DBUILDING_NGHTTP2) + +set(NGHTTP2_SOURCES + nghttp2_pq.c nghttp2_map.c nghttp2_queue.c + nghttp2_frame.c + nghttp2_buf.c + nghttp2_stream.c nghttp2_outbound_item.c + nghttp2_session.c nghttp2_submit.c + nghttp2_helper.c + nghttp2_npn.c + nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c + nghttp2_version.c + nghttp2_priority_spec.c + nghttp2_option.c + nghttp2_callbacks.c + nghttp2_mem.c + nghttp2_http.c + nghttp2_rcbuf.c + nghttp2_debug.c +) + +set(NGHTTP2_RES "") + +if(WIN32) + configure_file( + version.rc.in + ${CMAKE_CURRENT_BINARY_DIR}/version.rc + @ONLY) + + set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) +endif() + +# Public shared library +add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) +set_target_properties(nghttp2 PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} + C_VISIBILITY_PRESET hidden +) + +if(HAVE_CUNIT) + # Static library (for unittests because of symbol visibility) + add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES}) + set_target_properties(nghttp2_static PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} + ARCHIVE_OUTPUT_NAME nghttp2 + ) + target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB") +endif() + +install(TARGETS nghttp2 + DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libnghttp2.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") |