2009-09-09 13:20:33 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2009-09-09 13:20:33 +00:00
|
|
|
#
|
|
|
|
|
2015-12-04 00:09:57 +00:00
|
|
|
set(WSCODECS_FILES
|
2013-12-01 03:53:57 +00:00
|
|
|
codecs.c
|
2009-09-09 13:20:33 +00:00
|
|
|
G711a/G711adecode.c
|
|
|
|
G711u/G711udecode.c
|
2014-12-13 00:51:40 +00:00
|
|
|
speex/resample.c
|
|
|
|
)
|
|
|
|
|
|
|
|
# Enables visibility in IDEs
|
|
|
|
file(GLOB EXTRA_CODEC_HEADERS
|
|
|
|
codecs.h
|
|
|
|
G711a/G711adecode.h G711a/G711atable.h
|
|
|
|
G711u/G711udecode.h G711u/G711utable.h
|
|
|
|
speex/arch.h
|
|
|
|
speex/speex_resampler.h
|
|
|
|
speex/stack_alloc.h
|
2009-09-09 13:20:33 +00:00
|
|
|
)
|
|
|
|
|
2014-12-09 21:22:20 +00:00
|
|
|
if(SBC_FOUND)
|
2015-12-04 00:09:57 +00:00
|
|
|
set(WSCODECS_FILES ${WSCODECS_FILES} sbc/sbc.c)
|
2014-12-09 21:22:20 +00:00
|
|
|
endif()
|
|
|
|
|
2015-12-04 00:09:57 +00:00
|
|
|
set(wscodecs_LIBS
|
2016-02-05 19:14:51 +00:00
|
|
|
${M_LIBRARIES}
|
2015-12-03 20:32:25 +00:00
|
|
|
${GMODULE2_LIBRARIES}
|
2016-02-05 19:14:51 +00:00
|
|
|
${SBC_LIBRARIES}
|
2015-12-03 20:32:25 +00:00
|
|
|
wsutil
|
|
|
|
)
|
|
|
|
|
2016-11-23 23:27:14 +00:00
|
|
|
if(HAVE_SPANDSP)
|
|
|
|
list(APPEND WSCODECS_FILES G722/G722decode.c G726/G726decode.c)
|
|
|
|
list(APPEND wscodecs_LIBS ${SPANDSP_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2017-07-26 21:23:12 +00:00
|
|
|
if(HAVE_BCG729)
|
|
|
|
list(APPEND WSCODECS_FILES G729/G729decode.c)
|
|
|
|
list(APPEND wscodecs_LIBS ${BCG729_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2015-12-04 00:09:57 +00:00
|
|
|
add_library(wscodecs ${LINK_MODE_LIB}
|
|
|
|
${WSCODECS_FILES}
|
2015-12-03 20:32:25 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/libwscodecs.rc
|
2009-09-09 13:20:33 +00:00
|
|
|
)
|
2015-12-03 20:32:25 +00:00
|
|
|
|
|
|
|
set(FULL_SO_VERSION "0.0.0")
|
|
|
|
|
2015-12-04 00:09:57 +00:00
|
|
|
set_target_properties(wscodecs PROPERTIES
|
2015-12-04 06:59:01 +00:00
|
|
|
PREFIX "lib"
|
2015-12-03 20:32:25 +00:00
|
|
|
COMPILE_DEFINITIONS "WS_BUILD_DLL"
|
2016-08-16 21:21:59 +00:00
|
|
|
COMPILE_OPTIONS "${WS_WS_WARNINGS_C_FLAGS}"
|
2015-12-03 20:32:25 +00:00
|
|
|
LINK_FLAGS "${WS_LINK_FLAGS}"
|
|
|
|
VERSION ${FULL_SO_VERSION} SOVERSION 0
|
2016-06-21 13:30:33 +00:00
|
|
|
FOLDER "DLLs"
|
2015-12-03 20:32:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
2015-12-04 00:09:57 +00:00
|
|
|
set_target_properties(wscodecs PROPERTIES
|
2015-12-03 20:32:25 +00:00
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-12-04 00:09:57 +00:00
|
|
|
target_link_libraries(wscodecs ${wscodecs_LIBS})
|
2015-12-03 20:32:25 +00:00
|
|
|
|
|
|
|
if(NOT ${ENABLE_STATIC})
|
2015-12-04 00:09:57 +00:00
|
|
|
install(TARGETS wscodecs
|
2015-12-03 20:32:25 +00:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
endif()
|
2016-03-11 19:51:39 +00:00
|
|
|
|
|
|
|
CHECKAPI(
|
|
|
|
NAME
|
|
|
|
codecs
|
|
|
|
SWITCHES
|
|
|
|
-g abort -g termoutput -build
|
|
|
|
SOURCES
|
|
|
|
${WSCODECS_FILES}
|
|
|
|
)
|