mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 11:15:13 +00:00
Define BUILD_SHARED_LIBS flag, which will define LIBRARY_TYPE variable
This commit is contained in:
parent
fc819a24b6
commit
7c4895a6fd
2 changed files with 9 additions and 4 deletions
|
|
@ -37,11 +37,16 @@ set(LIBWEBRTC_VERSION
|
||||||
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options
|
# Options, flags
|
||||||
#
|
|
||||||
|
|
||||||
option(BUILD_TESTS "Build test binaries" OFF)
|
option(BUILD_TESTS "Build test binaries" OFF)
|
||||||
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
||||||
|
option(BUILD_SHARED_LIBS "Build WebRTC as a shared library." OFF)
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
set(LIBRARY_TYPE SHARED)
|
||||||
|
else()
|
||||||
|
set(LIBRARY_TYPE STATIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Offer the user the choice of overriding the installation directories
|
# Offer the user the choice of overriding the installation directories
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ if (${LIBWEBRTC_OBJ_EXCLUDED_LEN} GREATER "0")
|
||||||
list(REMOVE_ITEM LIBWEBRTC_OBJ_FILES ${LIBWEBRTC_OBJ_EXCLUDED})
|
list(REMOVE_ITEM LIBWEBRTC_OBJ_FILES ${LIBWEBRTC_OBJ_EXCLUDED})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_library(webrtc STATIC ${LIBWEBRTC_OBJ_FILES})
|
add_library(webrtc ${LIBRARY_TYPE} ${_OBJ_FILES})
|
||||||
|
|
||||||
set_source_files_properties(${LIBWEBRTC_OBJ_FILES} PROPERTIES
|
set_source_files_properties(${LIBWEBRTC_OBJ_FILES} PROPERTIES
|
||||||
EXTERNAL_OBJECT true
|
EXTERNAL_OBJECT true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue