mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:19:01 +08:00
[speex] Fix debug mode .def file. Add exports for extern globals.
This commit is contained in:
parent
71f8958a06
commit
d5395ac793
@ -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,15 @@ include_directories(win32 include)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
file(READ "win32/libspeex.def" _contents)
|
||||
string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def"
|
||||
"${_contents}\n"
|
||||
"speex_nb_mode\n"
|
||||
"speex_wb_mode\n"
|
||||
"speex_uwb_mode\n"
|
||||
)
|
||||
|
||||
set(SRC
|
||||
"libspeex/bits.c"
|
||||
"libspeex/cb_search.c"
|
||||
@ -52,7 +59,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})
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: speex
|
||||
Version: 1.2.0-1
|
||||
Version: 1.2.0-2
|
||||
Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user