| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e84c9d7 commit fef2aa7
55 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,63 @@ | |||
| 1 | + add_subdirectory(includes) | ||
| 2 | + | ||
| 3 | + include_directories( | ||
| 4 | + "${CMAKE_CURRENT_SOURCE_DIR}/includes" | ||
| 5 | + "${CMAKE_CURRENT_BINARY_DIR}/includes" | ||
| 6 | + ) | ||
| 7 | + | ||
| 8 | + add_definitions(-DBUILDING_NGHTTP2) | ||
| 9 | + | ||
| 10 | + set(NGHTTP2_SOURCES | ||
| 11 | + nghttp2_pq.c nghttp2_map.c nghttp2_queue.c | ||
| 12 | + nghttp2_frame.c | ||
| 13 | + nghttp2_buf.c | ||
| 14 | + nghttp2_stream.c nghttp2_outbound_item.c | ||
| 15 | + nghttp2_session.c nghttp2_submit.c | ||
| 16 | + nghttp2_helper.c | ||
| 17 | + nghttp2_npn.c | ||
| 18 | + nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c | ||
| 19 | + nghttp2_version.c | ||
| 20 | + nghttp2_priority_spec.c | ||
| 21 | + nghttp2_option.c | ||
| 22 | + nghttp2_callbacks.c | ||
| 23 | + nghttp2_mem.c | ||
| 24 | + nghttp2_http.c | ||
| 25 | + nghttp2_rcbuf.c | ||
| 26 | + nghttp2_debug.c | ||
| 27 | + ) | ||
| 28 | + | ||
| 29 | + set(NGHTTP2_RES "") | ||
| 30 | + | ||
| 31 | + if(WIN32) | ||
| 32 | + configure_file( | ||
| 33 | + version.rc.in | ||
| 34 | + ${CMAKE_CURRENT_BINARY_DIR}/version.rc | ||
| 35 | + @ONLY) | ||
| 36 | + | ||
| 37 | + set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
| 38 | + endif() | ||
| 39 | + | ||
| 40 | + # Public shared library | ||
| 41 | + add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) | ||
| 42 | + set_target_properties(nghttp2 PROPERTIES | ||
| 43 | + COMPILE_FLAGS "${WARNCFLAGS}" | ||
| 44 | + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} | ||
| 45 | + C_VISIBILITY_PRESET hidden | ||
| 46 | + ) | ||
| 47 | + | ||
| 48 | + if(HAVE_CUNIT) | ||
| 49 | + # Static library (for unittests because of symbol visibility) | ||
| 50 | + add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES}) | ||
| 51 | + set_target_properties(nghttp2_static PROPERTIES | ||
| 52 | + COMPILE_FLAGS "${WARNCFLAGS}" | ||
| 53 | + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} | ||
| 54 | + ARCHIVE_OUTPUT_NAME nghttp2 | ||
| 55 | + ) | ||
| 56 | + target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB") | ||
| 57 | + endif() | ||
| 58 | + | ||
| 59 | + install(TARGETS nghttp2 | ||
| 60 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| 61 | + | ||
| 62 | + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libnghttp2.pc" | ||
| 63 | + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,72 @@ | |||
| 1 | + # nghttp2 - HTTP/2 C Library | ||
| 2 | + | ||
| 3 | + # Copyright (c) 2012, 2013 Tatsuhiro Tsujikawa | ||
| 4 | + | ||
| 5 | + # Permission is hereby granted, free of charge, to any person obtaining | ||
| 6 | + # a copy of this software and associated documentation files (the | ||
| 7 | + # "Software"), to deal in the Software without restriction, including | ||
| 8 | + # without limitation the rights to use, copy, modify, merge, publish, | ||
| 9 | + # distribute, sublicense, and/or sell copies of the Software, and to | ||
| 10 | + # permit persons to whom the Software is furnished to do so, subject to | ||
| 11 | + # the following conditions: | ||
| 12 | + | ||
| 13 | + # The above copyright notice and this permission notice shall be | ||
| 14 | + # included in all copies or substantial portions of the Software. | ||
| 15 | + | ||
| 16 | + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 17 | + # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 18 | + # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 19 | + # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
| 20 | + # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
| 21 | + # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
| 22 | + # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 23 | + SUBDIRS = includes | ||
| 24 | + | ||
| 25 | + EXTRA_DIST = Makefile.msvc CMakeLists.txt version.rc.in | ||
| 26 | + | ||
| 27 | + AM_CFLAGS = $(WARNCFLAGS) $(EXTRACFLAG) | ||
| 28 | + AM_CPPFLAGS = -I$(srcdir)/includes -I$(builddir)/includes -DBUILDING_NGHTTP2 \ | ||
| 29 | + @DEFS@ | ||
| 30 | + | ||
| 31 | + pkgconfigdir = $(libdir)/pkgconfig | ||
| 32 | + pkgconfig_DATA = libnghttp2.pc | ||
| 33 | + DISTCLEANFILES = $(pkgconfig_DATA) | ||
| 34 | + | ||
| 35 | + lib_LTLIBRARIES = libnghttp2.la | ||
| 36 | + | ||
| 37 | + OBJECTS = nghttp2_pq.c nghttp2_map.c nghttp2_queue.c \ | ||
| 38 | + nghttp2_frame.c \ | ||
| 39 | + nghttp2_buf.c \ | ||
| 40 | + nghttp2_stream.c nghttp2_outbound_item.c \ | ||
| 41 | + nghttp2_session.c nghttp2_submit.c \ | ||
| 42 | + nghttp2_helper.c \ | ||
| 43 | + nghttp2_npn.c \ | ||
| 44 | + nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c \ | ||
| 45 | + nghttp2_version.c \ | ||
| 46 | + nghttp2_priority_spec.c \ | ||
| 47 | + nghttp2_option.c \ | ||
| 48 | + nghttp2_callbacks.c \ | ||
| 49 | + nghttp2_mem.c \ | ||
| 50 | + nghttp2_http.c \ | ||
| 51 | + nghttp2_rcbuf.c \ | ||
| 52 | + nghttp2_debug.c | ||
| 53 | + | ||
| 54 | + HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \ | ||
| 55 | + nghttp2_frame.h \ | ||
| 56 | + nghttp2_buf.h \ | ||
| 57 | + nghttp2_session.h nghttp2_helper.h nghttp2_stream.h nghttp2_int.h \ | ||
| 58 | + nghttp2_npn.h \ | ||
| 59 | + nghttp2_submit.h nghttp2_outbound_item.h \ | ||
| 60 | + nghttp2_net.h \ | ||
| 61 | + nghttp2_hd.h nghttp2_hd_huffman.h \ | ||
| 62 | + nghttp2_priority_spec.h \ | ||
| 63 | + nghttp2_option.h \ | ||
| 64 | + nghttp2_callbacks.h \ | ||
| 65 | + nghttp2_mem.h \ | ||
| 66 | + nghttp2_http.h \ | ||
| 67 | + nghttp2_rcbuf.h \ | ||
| 68 | + nghttp2_debug.h | ||
| 69 | + | ||
| 70 | + libnghttp2_la_SOURCES = $(HFILES) $(OBJECTS) | ||
| 71 | + libnghttp2_la_LDFLAGS = -no-undefined \ | ||
| 72 | + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments