1 add_subdirectory(includes)
4 "${CMAKE_CURRENT_SOURCE_DIR}/includes"
5 "${CMAKE_CURRENT_BINARY_DIR}/includes"
8 add_definitions(-DBUILDING_NGHTTP2)
11 nghttp2_pq.c nghttp2_map.c nghttp2_queue.c
14 nghttp2_stream.c nghttp2_outbound_item.c
15 nghttp2_session.c nghttp2_submit.c
18 nghttp2_hd.c nghttp2_hd_huffman.c nghttp2_hd_huffman_data.c
20 nghttp2_priority_spec.c
34 ${CMAKE_CURRENT_BINARY_DIR}/version.rc
37 set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
40 # Public shared library
42 add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES})
43 set_target_properties(nghttp2 PROPERTIES
44 COMPILE_FLAGS "${WARNCFLAGS}"
45 VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
46 C_VISIBILITY_PRESET hidden
48 target_include_directories(nghttp2 INTERFACE
49 "${CMAKE_CURRENT_BINARY_DIR}/includes"
50 "${CMAKE_CURRENT_SOURCE_DIR}/includes"
53 install(TARGETS nghttp2
54 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
55 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
56 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
59 if(HAVE_CUNIT OR ENABLE_STATIC_LIB)
60 # Static library (for unittests because of symbol visibility)
61 add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES})
62 set_target_properties(nghttp2_static PROPERTIES
63 COMPILE_FLAGS "${WARNCFLAGS}"
64 VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
65 ARCHIVE_OUTPUT_NAME nghttp2${STATIC_LIB_SUFFIX}
67 target_compile_definitions(nghttp2_static PUBLIC "-DNGHTTP2_STATICLIB")
69 install(TARGETS nghttp2_static
70 DESTINATION "${CMAKE_INSTALL_LIBDIR}")
75 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libnghttp2.pc"
76 DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")