diff options
Diffstat (limited to 'ports/speex')
| -rw-r--r-- | ports/speex/CMakeLists.txt | 17 | ||||
| -rw-r--r-- | ports/speex/CONTROL | 2 | ||||
| -rw-r--r-- | ports/speex/portfile.cmake | 6 |
3 files changed, 21 insertions, 4 deletions
diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 839222ae6..bdce0b3c3 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required (VERSION 3.8.0) project (libspeex C) -set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) - option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) if(MSVC) add_definitions(-DHAVE_CONFIG_H) @@ -17,6 +15,19 @@ include_directories(win32 include) set(CMAKE_DEBUG_POSTFIX d) +file(READ "win32/libspeex.def" _contents) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}") +endif() +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" + "${_contents}\n" + "speex_nb_mode\n" + "speex_wb_mode\n" + "speex_uwb_mode\n" + "speex_mode_list\n" + "speex_header_free\n" +) + set(SRC "libspeex/bits.c" "libspeex/cb_search.c" @@ -52,7 +63,7 @@ set(SRC "libspeex/vbr.c" "libspeex/vq.c" "libspeex/window.c" - "win32/libspeex.def" + "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" ) add_library(libspeex ${SRC}) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 5d3fa10a2..6fcda84be 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 1.2.0-1 +Version: 1.2.0-4 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 6eed0cfc9..271c2bc88 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -18,4 +18,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(READ "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" _contents) + string(REPLACE "extern const SpeexMode" "__declspec(dllimport) extern const SpeexMode" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" "${_contents}") +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) |
