mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-19 20:09:28 +08:00
24 lines
787 B
Diff
24 lines
787 B
Diff
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
|
index 0846d06..290679f 100644
|
|
--- a/lib/CMakeLists.txt
|
|
+++ b/lib/CMakeLists.txt
|
|
@@ -38,7 +38,7 @@ if(WIN32)
|
|
endif()
|
|
|
|
# Public shared library
|
|
-add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES})
|
|
+add_library(nghttp2 ${NGHTTP2_SOURCES} ${NGHTTP2_RES})
|
|
set_target_properties(nghttp2 PROPERTIES
|
|
COMPILE_FLAGS "${WARNCFLAGS}"
|
|
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION}
|
|
@@ -48,6 +48,9 @@ target_include_directories(nghttp2 INTERFACE
|
|
"${CMAKE_CURRENT_BINARY_DIR}/includes"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/includes"
|
|
)
|
|
+if(NOT BUILD_SHARED_LIBS)
|
|
+ target_compile_definitions(nghttp2 PUBLIC "-DNGHTTP2_STATICLIB")
|
|
+endif()
|
|
|
|
if(HAVE_CUNIT)
|
|
# Static library (for unittests because of symbol visibility)
|