mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 20:23:41 +08:00
[speex] init port #958
This commit is contained in:
parent
df3f73d825
commit
40935c4e40
105
ports/speex/CMakeLists.txt
Normal file
105
ports/speex/CMakeLists.txt
Normal file
@ -0,0 +1,105 @@
|
||||
cmake_minimum_required (VERSION 3.8.0)
|
||||
project (libspeex)
|
||||
|
||||
set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include)
|
||||
set(SOURCE_PATH ${PROJECT_SOURCE_DIR})
|
||||
set(SPEEX_PATH ${SOURCE_PATH}/include/speex)
|
||||
set(LIBSPEEX_PATH ${SOURCE_PATH}/libspeex)
|
||||
|
||||
option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON)
|
||||
if(MSVC)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
if(USE_SSE)
|
||||
add_definitions(-DUSE_SSE -DFLOATING_POINT)
|
||||
else()
|
||||
add_definitions(-DFIXED_POINT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set(LIB_HEADERS
|
||||
"${LIBSPEEX_PATH}/cb_search.h"
|
||||
"${SOURCE_PATH}/win32/config.h"
|
||||
"${LIBSPEEX_PATH}/fftwrap.h"
|
||||
"${LIBSPEEX_PATH}/filters.h"
|
||||
"${LIBSPEEX_PATH}/filters_sse.h"
|
||||
"${LIBSPEEX_PATH}/kiss_fft.h"
|
||||
"${LIBSPEEX_PATH}/kiss_fftr.h"
|
||||
"${LIBSPEEX_PATH}/lpc.h"
|
||||
"${LIBSPEEX_PATH}/arch.h"
|
||||
"${LIBSPEEX_PATH}/lsp.h"
|
||||
"${LIBSPEEX_PATH}/ltp.h"
|
||||
"${LIBSPEEX_PATH}/ltp_sse.h"
|
||||
"${LIBSPEEX_PATH}/math_approx.h"
|
||||
"${LIBSPEEX_PATH}/modes.h"
|
||||
"${LIBSPEEX_PATH}/nb_celp.h"
|
||||
"${LIBSPEEX_PATH}/quant_lsp.h"
|
||||
"${LIBSPEEX_PATH}/sb_celp.h"
|
||||
"${LIBSPEEX_PATH}/stack_alloc.h"
|
||||
"${LIBSPEEX_PATH}/vbr.h"
|
||||
"${LIBSPEEX_PATH}/vq.h"
|
||||
)
|
||||
set(
|
||||
SPEEX_HEADERS
|
||||
"${SPEEX_PATH}/speex.h"
|
||||
"${SPEEX_PATH}/speex_bits.h"
|
||||
"${SPEEX_PATH}/speex_callbacks.h"
|
||||
"${SPEEX_PATH}/speex_header.h"
|
||||
"${SPEEX_PATH}/speex_stereo.h"
|
||||
"${SPEEX_PATH}/speex_types.h"
|
||||
)
|
||||
set(SRC
|
||||
"${LIBSPEEX_PATH}/bits.c"
|
||||
"${LIBSPEEX_PATH}/cb_search.c"
|
||||
"${LIBSPEEX_PATH}/exc_10_16_table.c"
|
||||
"${LIBSPEEX_PATH}/exc_10_32_table.c"
|
||||
"${LIBSPEEX_PATH}/exc_20_32_table.c"
|
||||
"${LIBSPEEX_PATH}/exc_5_256_table.c"
|
||||
"${LIBSPEEX_PATH}/exc_5_64_table.c"
|
||||
"${LIBSPEEX_PATH}/exc_8_128_table.c"
|
||||
"${LIBSPEEX_PATH}/fftwrap.c"
|
||||
"${LIBSPEEX_PATH}/filters.c"
|
||||
"${LIBSPEEX_PATH}/gain_table.c"
|
||||
"${LIBSPEEX_PATH}/gain_table_lbr.c"
|
||||
"${LIBSPEEX_PATH}/hexc_10_32_table.c"
|
||||
"${LIBSPEEX_PATH}/hexc_table.c"
|
||||
"${LIBSPEEX_PATH}/high_lsp_tables.c"
|
||||
"${LIBSPEEX_PATH}/kiss_fft.c"
|
||||
"${LIBSPEEX_PATH}/kiss_fftr.c"
|
||||
"${LIBSPEEX_PATH}/lpc.c"
|
||||
"${LIBSPEEX_PATH}/lsp.c"
|
||||
"${LIBSPEEX_PATH}/lsp_tables_nb.c"
|
||||
"${LIBSPEEX_PATH}/ltp.c"
|
||||
"${LIBSPEEX_PATH}/modes.c"
|
||||
"${LIBSPEEX_PATH}/modes_wb.c"
|
||||
"${LIBSPEEX_PATH}/nb_celp.c"
|
||||
"${LIBSPEEX_PATH}/quant_lsp.c"
|
||||
"${LIBSPEEX_PATH}/sb_celp.c"
|
||||
"${LIBSPEEX_PATH}/smallft.c"
|
||||
"${LIBSPEEX_PATH}/speex.c"
|
||||
"${LIBSPEEX_PATH}/speex_callbacks.c"
|
||||
"${LIBSPEEX_PATH}/speex_header.c"
|
||||
"${LIBSPEEX_PATH}/stereo.c"
|
||||
"${LIBSPEEX_PATH}/vbr.c"
|
||||
"${LIBSPEEX_PATH}/vq.c"
|
||||
"${LIBSPEEX_PATH}/window.c"
|
||||
)
|
||||
|
||||
file(COPY ${LIB_HEADERS} DESTINATION ${COMMON_INCLUDES}/)
|
||||
file(COPY ${SPEEX_HEADERS} DESTINATION ${COMMON_INCLUDES}/speex)
|
||||
|
||||
|
||||
include_directories(${COMMON_INCLUDES})
|
||||
add_library (libspeex STATIC ${SRC})
|
||||
|
||||
|
||||
install(
|
||||
TARGETS libspeex
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h")
|
||||
endif()
|
3
ports/speex/CONTROL
Normal file
3
ports/speex/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: speex
|
||||
Version:
|
||||
Description:
|
26
ports/speex/portfile.cmake
Normal file
26
ports/speex/portfile.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic )
|
||||
message(STATUS "Speex support visibility on Win32 ye. Building static.")
|
||||
message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more")
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO xiph/speex
|
||||
REF cae5026cfd88782c7051af6e685059223578b7e9
|
||||
SHA512 93385363561c41f5c6bb7fce8e7cd1954520191a4741a8618daaf0a0bfa0c5c5de9926b989f1ae85b99bf4307afb445f307a01a9487abcc0d4ffa690711b8e49
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright)
|
Loading…
x
Reference in New Issue
Block a user