Permalink
Browse files

add BUILD_SHARED to support library type and add BUILD_SHARED to README

  • Loading branch information...
LightZam authored and jlaine committed Oct 15, 2018
1 parent 5559ed2 commit 2b28b3ca6ff65f1ff1840cfdedb45f72498cd15e
Showing with 14 additions and 8 deletions.
  1. +8 −7 README.md
  2. +6 −1 src/CMakeLists.txt
@@ -36,13 +36,14 @@ Build from command line:
You can pass the following arguments to CMake:
BUILD_DOCUMENTATION to build the documentation
BUILD_EXAMPLES to build the examples
BUILD_TESTS to build the unit tests
WITH_OPUS to enable opus audio codec
WITH_SPEEX to enable speex audio codec
WITH_THEORA to enable theora video codec
WITH_VPX to enable vpx video codec
BUILD_SHARED to build with shared type library, otherwise static (default: true)
BUILD_DOCUMENTATION to build the documentation (default: false)
BUILD_EXAMPLES to build the examples (default: true)
BUILD_TESTS to build the unit tests (default: true)
WITH_OPUS to enable opus audio codec (default: false)
WITH_SPEEX to enable speex audio codec (default: false)
WITH_THEORA to enable theora video codec (default: false)
WITH_VPX to enable vpx video codec (default: false)
INSTALLING QXMPP
================
@@ -161,6 +161,7 @@ option(WITH_SPEEX "Support the Speex codec" OFF)
option(WITH_OPUS "Support the Opus codec" OFF)
option(WITH_THEORA "Support the Theora codec" OFF)
option(WITH_VPX "Support the VPX codec" OFF)
option(BUILD_SHARED "Build SHARED library" ON)
if(WITH_SPEEX)
find_package(Speex REQUIRED)
@@ -187,7 +188,11 @@ if(WITH_VPX)
add_definitions(-DQXMPP_USE_VPX)
endif()
add_library(qxmpp SHARED ${SOURCE_FILES})
if(BUILD_SHARED)
add_library(qxmpp SHARED ${SOURCE_FILES})
else()
add_library(qxmpp STATIC ${SOURCE_FILES})
endif()
set_target_properties(qxmpp PROPERTIES
VERSION ${VERSION_STRING}

0 comments on commit 2b28b3c

Please sign in to comment.