aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2019-02-02 14:52:07 +0000
committerJoão Valverde <j@v6e.pt>2019-05-02 21:12:01 +0000
commit186f985793cceb7d7222955987df72ab5a82beeb (patch)
treeff6c744a7d5ee356b5bc6e8632916bbb68a6ca30 /CMakeLists.txt
parent854479a7dcd198fa2f167a7845e22688d2f710d5 (diff)
CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25 Reviewed-on: https://code.wireshark.org/review/31857 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84c2b0d133..4e44f96849 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1162,6 +1162,18 @@ find_package(POD REQUIRED)
find_package(DOXYGEN)
+# The SpeexDSP resampler is required iff building wireshark or sharkd.
+if(BUILD_wireshark OR BUILD_sharkd)
+ find_package(SpeexDSP)
+ if(SpeexDSP_FOUND)
+ set(HAVE_SPEEXDSP 1)
+ else()
+ add_subdirectory(speexdsp)
+ set(SPEEXDSP_INCLUDE_DIRS "")
+ set(SPEEXDSP_LIBRARIES "speexresampler")
+ endif()
+endif()
+
# dist target that prepares source dir
# XXX Duplicated in the RPM section below.
add_custom_target(dist
@@ -1558,6 +1570,11 @@ set_package_properties(MaxMindDB PROPERTIES
DESCRIPTION "C library for the MaxMind DB file format"
PURPOSE "Support for GeoIP lookup"
)
+set_package_properties(SpeexDSP PROPERTIES
+ URL "https://www.speex.org/"
+ DESCRIPTION "SpeexDSP is a patent-free, Open Source/Free Software DSP library"
+ PURPOSE "RTP audio resampling"
+)
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
message(STATUS "C-Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_build_type}}")
@@ -2180,6 +2197,7 @@ if(BUILD_wireshark AND QT_FOUND)
${WIN_VERSION_LIBRARY}
${WINSPARKLE_LIBRARIES}
$<$<BOOL:${WIN32}>:UxTheme.lib>
+ ${SPEEXDSP_LIBRARIES}
)
add_executable(wireshark WIN32 MACOSX_BUNDLE ${wireshark_FILES} ${EXTRA_BUNDLE_FILES})
@@ -2368,6 +2386,7 @@ if(BUILD_sharkd)
${APPLE_CORE_FOUNDATION_LIBRARY}
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
${WIN_WS2_32_LIBRARY}
+ ${SPEEXDSP_LIBRARIES}
)
set(sharkd_FILES
#
@@ -2384,6 +2403,10 @@ if(BUILD_sharkd)
add_executable(sharkd ${sharkd_FILES})
set_extra_executable_properties(sharkd "Executables")
target_link_libraries(sharkd ${sharkd_LIBS})
+ target_include_directories(sharkd SYSTEM
+ PUBLIC
+ ${SPEEXDSP_INCLUDE_DIRS}
+ )
install(TARGETS sharkd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()