diff options
author | Peter Colberg <peter@colberg.org> | 2015-12-29 00:29:42 -0500 |
---|---|---|
committer | Peter Colberg <peter@colberg.org> | 2015-12-29 00:29:42 -0500 |
commit | 4803e6a493f9233567f6fe6923facafd0495e7d7 (patch) | |
tree | 6056aa24807d0723ee4c7c11711e20a8feea6597 /src | |
parent | 3f17756e67e8da2e93f796ca6e7c1bb61b7b00b5 (diff) | |
download | twinkle-4803e6a493f9233567f6fe6923facafd0495e7d7.tar twinkle-4803e6a493f9233567f6fe6923facafd0495e7d7.tar.gz twinkle-4803e6a493f9233567f6fe6923facafd0495e7d7.tar.lz twinkle-4803e6a493f9233567f6fe6923facafd0495e7d7.tar.xz twinkle-4803e6a493f9233567f6fe6923facafd0495e7d7.zip |
Add option WITH_GSM to use external gsm library
This permits distributions to build against a packaged gsm library.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/audio/audio_tx.h | 7 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a721272..11c79f6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,9 @@ project(libtwinkle) include_directories("${CMAKE_CURRENT_SOURCE_DIR}") add_subdirectory(audio) -add_subdirectory(audio/gsm/src) +if (NOT WITH_GSM) + add_subdirectory(audio/gsm/src) +endif (NOT WITH_GSM) add_subdirectory(audits) add_subdirectory(im) add_subdirectory(mwi) @@ -57,7 +59,6 @@ add_library(libtwinkle OBJECT ${LIBTWINKLE_SRCS}) set(twinkle_OBJS $<TARGET_OBJECTS:libtwinkle> $<TARGET_OBJECTS:libtwinkle-audio> - $<TARGET_OBJECTS:libtwinkle-gsm> $<TARGET_OBJECTS:libtwinkle-audits> $<TARGET_OBJECTS:libtwinkle-im> $<TARGET_OBJECTS:libtwinkle-mwi> @@ -70,6 +71,9 @@ set(twinkle_OBJS $<TARGET_OBJECTS:libtwinkle-threads> $<TARGET_OBJECTS:libtwinkle-utils> ) +if (NOT WITH_GSM) + list(APPEND twinkle_OBJS $<TARGET_OBJECTS:libtwinkle-gsm>) +endif (NOT WITH_GSM) add_executable(twinkle-console main.cpp @@ -92,6 +96,9 @@ set(twinkle_LIBS ${ALSA_LIBRARY} ${G729_LIBRARY} ) +if (WITH_GSM) + list(APPEND twinkle_LIBS ${GSM_LIBRARY}) +endif (WITH_GSM) if (WITH_QT4 OR WITH_QT5) add_subdirectory(gui) diff --git a/src/audio/audio_tx.h b/src/audio/audio_tx.h index a51ef9a..20daebc 100644 --- a/src/audio/audio_tx.h +++ b/src/audio/audio_tx.h @@ -30,11 +30,16 @@ #include "rtp_telephone_event.h" #include "user.h" #include "threads/mutex.h" -#include "gsm/inc/gsm.h" #include "audio_device.h" #include "twinkle_rtp_session.h" #include "twinkle_config.h" +#ifdef HAVE_GSM +#include <gsm/gsm.h> +#else +#include "gsm/inc/gsm.h" +#endif + using namespace std; using namespace ost; |