aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-12-02 23:57:17 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-12-02 23:57:17 -0800
commitd5395ac793d1db78ab97ca144d5e89eabf49a735 (patch)
tree61bcc9dccc87468de3554a4fac37a4ca9088f14b
parent71f8958a069208b08a4bcca207956ef8a15238ab (diff)
downloadvcpkg-d5395ac793d1db78ab97ca144d5e89eabf49a735.tar.gz
vcpkg-d5395ac793d1db78ab97ca144d5e89eabf49a735.zip
[speex] Fix debug mode .def file. Add exports for extern globals.
-rw-r--r--ports/speex/CMakeLists.txt13
-rw-r--r--ports/speex/CONTROL2
-rw-r--r--ports/speex/portfile.cmake6
3 files changed, 17 insertions, 4 deletions
diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt
index 839222ae6..915b08226 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,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})
diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL
index 5d3fa10a2..00910a596 100644
--- a/ports/speex/CONTROL
+++ b/ports/speex/CONTROL
@@ -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.
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)