diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:53:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:53:04 +0000 |
commit | 7c706d82095060c9b688aee9874199b32e4c96cd (patch) | |
tree | 2659204f2c602ab45a1cef883fb75d1946f47fdf /lib/CMakeLists.txt | |
parent | Adding debian version 1.60.0-1. (diff) | |
download | nghttp2-7c706d82095060c9b688aee9874199b32e4c96cd.tar.xz nghttp2-7c706d82095060c9b688aee9874199b32e4c96cd.zip |
Merging upstream version 1.61.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r-- | lib/CMakeLists.txt | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 211c8e4..fda8dcb 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -34,6 +34,10 @@ set(NGHTTP2_RES "") set(STATIC_LIB "nghttp2_static") set(SHARED_LIB "nghttp2") +if(BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS AND MSVC AND NOT STATIC_LIB_SUFFIX) + set(STATIC_LIB_SUFFIX "_static") +endif() + if(WIN32) configure_file( version.rc.in @@ -66,23 +70,23 @@ if(BUILD_SHARED_LIBS) endif() # Static library (for unittests because of symbol visibility) -add_library(${STATIC_LIB} STATIC ${NGHTTP2_SOURCES}) +if(BUILD_STATIC_LIBS) + add_library(${STATIC_LIB} STATIC ${NGHTTP2_SOURCES}) -set_target_properties(${STATIC_LIB} PROPERTIES - COMPILE_FLAGS "${WARNCFLAGS}" - VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} - ARCHIVE_OUTPUT_NAME nghttp2${STATIC_LIB_SUFFIX} -) + set_target_properties(${STATIC_LIB} PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} + ARCHIVE_OUTPUT_NAME nghttp2${STATIC_LIB_SUFFIX} + ) -target_include_directories(${STATIC_LIB} INTERFACE - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes> - $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes> - $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> -) + target_include_directories(${STATIC_LIB} INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes> + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + ) -target_compile_definitions(${STATIC_LIB} PUBLIC "-DNGHTTP2_STATICLIB") + target_compile_definitions(${STATIC_LIB} PUBLIC "-DNGHTTP2_STATICLIB") -if(BUILD_STATIC_LIBS) install(TARGETS ${STATIC_LIB} EXPORT ${EXPORT_SET}) list(APPEND nghttp2_exports ${STATIC_LIB}) endif() |