Skip to content

Commit 740ad5c

Browse files
Make datachannel target comply with BUILD_SHARED_LIBS option
1 parent 9bbc79b commit 740ad5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set(PROJECT_DESCRIPTION "C/C++ WebRTC network library featuring Data Channels, M
77
include(GNUInstallDirs)
88

99
# Options
10+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
1011
option(USE_GNUTLS "Use GnuTLS instead of OpenSSL" OFF)
1112
option(USE_MBEDTLS "Use Mbed TLS instead of OpenSSL" OFF)
1213
option(USE_NICE "Use libnice instead of libjuice" OFF)
@@ -49,7 +50,6 @@ endif()
4950

5051
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
5152
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
52-
set(BUILD_SHARED_LIBS OFF) # to force usrsctp to be built static
5353

5454
if(WIN32)
5555
add_definitions(-DWIN32_LEAN_AND_MEAN)
@@ -268,7 +268,7 @@ if(RTC_UPDATE_VERSION_HEADER)
268268
)
269269
endif()
270270

271-
add_library(datachannel SHARED
271+
add_library(datachannel
272272
${LIBDATACHANNEL_SOURCES}
273273
${LIBDATACHANNEL_HEADERS}
274274
${LIBDATACHANNEL_IMPL_SOURCES}

0 commit comments

Comments
 (0)