build: enable library-only build for nghttp2

Add the option to build nghttp2 as a static library only, simplifying integration for projects that do not require shared libraries.
This commit is contained in:
zhangyi 2024-09-25 21:12:30 +08:00
parent dbc5c5ef17
commit bb118d230d

View File

@ -28,6 +28,7 @@ if(NOT nghttp2_POPULATED)
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)
set(BUILD_STATIC_LIBS ON) set(BUILD_STATIC_LIBS ON)
set(ENABLE_LIB_ONLY ON)
# Avoid name conflict # Avoid name conflict
set(nghttp2_CMAKE_FILE "${nghttp2_SOURCE_DIR}/CMakeLists.txt") set(nghttp2_CMAKE_FILE "${nghttp2_SOURCE_DIR}/CMakeLists.txt")