diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-06-28 15:27:08 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-06-28 15:27:20 -0700 |
| commit | 78349d7a0c4cd0d2df1f120cbe58be9fa873757c (patch) | |
| tree | 3b5f2b19eb73ce5c8fce7b2ad64864349a5fda8a | |
| parent | 40935c4e407a6e6c08e7ed007da812833597e9be (diff) | |
| download | vcpkg-78349d7a0c4cd0d2df1f120cbe58be9fa873757c.tar.gz vcpkg-78349d7a0c4cd0d2df1f120cbe58be9fa873757c.zip | |
[speex] Simplify CMakeLists.txt
| -rw-r--r-- | ports/speex/CMakeLists.txt | 121 | ||||
| -rw-r--r-- | ports/speex/portfile.cmake | 7 |
2 files changed, 48 insertions, 80 deletions
diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 1c1a42a80..eff1d585a 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required (VERSION 3.8.0) -project (libspeex) +project (libspeex C) + +if(BUILD_SHARED_LIBS) + message(FATAL_ERROR "This CMake buildsystem only supports static builds") +endif() 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) @@ -16,82 +17,48 @@ if(MSVC) endif() endif() +include_directories(win32 include) + +set(CMAKE_DEBUG_POSTFIX d) -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" + "libspeex/bits.c" + "libspeex/cb_search.c" + "libspeex/exc_10_16_table.c" + "libspeex/exc_10_32_table.c" + "libspeex/exc_20_32_table.c" + "libspeex/exc_5_256_table.c" + "libspeex/exc_5_64_table.c" + "libspeex/exc_8_128_table.c" + "libspeex/fftwrap.c" + "libspeex/filters.c" + "libspeex/gain_table.c" + "libspeex/gain_table_lbr.c" + "libspeex/hexc_10_32_table.c" + "libspeex/hexc_table.c" + "libspeex/high_lsp_tables.c" + "libspeex/kiss_fft.c" + "libspeex/kiss_fftr.c" + "libspeex/lpc.c" + "libspeex/lsp.c" + "libspeex/lsp_tables_nb.c" + "libspeex/ltp.c" + "libspeex/modes.c" + "libspeex/modes_wb.c" + "libspeex/nb_celp.c" + "libspeex/quant_lsp.c" + "libspeex/sb_celp.c" + "libspeex/smallft.c" + "libspeex/speex.c" + "libspeex/speex_callbacks.c" + "libspeex/speex_header.c" + "libspeex/stereo.c" + "libspeex/vbr.c" + "libspeex/vq.c" + "libspeex/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}) - +add_library(libspeex ${SRC}) install( TARGETS libspeex @@ -101,5 +68,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h") + install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 96e8526ab..75841d7d0 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic ) - message(STATUS "Speex support visibility on Win32 ye. Building static.") +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Speex doesn't support visibility on Win32 yet. Building static.") message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") - set(VCPKG_LIBRARY_LINKAGE dynamic) + set(VCPKG_LIBRARY_LINKAGE static) endif() vcpkg_from_github( @@ -18,6 +18,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) |
