Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* ADD [cmake] add switch for static link #749

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmake/FindmbedTLS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ find_path(MBEDTLS_INCLUDE_DIR
PATHS /usr/local
PATH_SUFFIXES include)

set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
if (BUILD_WTIH_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif ()

find_library(MBEDTLS_CRYPTO_LIBRARY
NAMES mbedcrypto
Expand Down
11 changes: 9 additions & 2 deletions src/supplemental/quic/msquic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ if(NNG_QUIC_LIB STREQUAL "msquic")
Taking MSQUIC as quic lib
************************************************************")
set(_MSQUIC_ROOT_HINTS ${MSQUIC_ROOT_DIR} ENV MSQUIC_ROOT_DIR)
SET(QUIC_BUILD_SHARED OFF)

if(BUILD_WTIH_STATIC_LIBS)
set(QUIC_BUILD_SHARED OFF)
endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/extern/msquic msquic)

nng_defines(QUIC_TLS_ENGINE_INIT=nng_quic_libs_init_msquic)
Expand All @@ -28,7 +32,10 @@ if(NNG_QUIC_LIB STREQUAL "msquic")
PATHS /usr/local
PATH_SUFFIXES include)

set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
if(BUILD_WTIH_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()

find_library(MSQUIC_LIBRARIES
NAMES msquic
HINTS ${_MSQUIC_ROOT_HINTS}
Expand Down
Loading