diff options
| author | Zam <love8879201@gmail.com> | 2018-10-15 16:05:40 +0800 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2018-11-26 11:41:37 +0100 |
| commit | 2b28b3ca6ff65f1ff1840cfdedb45f72498cd15e (patch) | |
| tree | 7f2e3ccc795f605e922f6bace95f0b68d76cf81b | |
| parent | 5559ed29681d031f36e7a7d011e3ec4bec3635f5 (diff) | |
| download | qxmpp-2b28b3ca6ff65f1ff1840cfdedb45f72498cd15e.tar.gz | |
add BUILD_SHARED to support library type and add BUILD_SHARED to README
| -rw-r--r-- | README.md | 15 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 7 |
2 files changed, 14 insertions, 8 deletions
@@ -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 ================ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ac46cf4c..976f069e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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} |
