aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNemirtingas <9432037+Nemirtingas@users.noreply.github.com>2020-10-13 22:27:26 +0200
committerGitHub <noreply@github.com>2020-10-13 13:27:26 -0700
commit654adc64b36607aff14f614387eb904d64faec2b (patch)
tree4ee427248a83f660431e7b2a0fe325b2726b2d02
parentd50a66f62809caca1b422e589118ab6ec2d9a47a (diff)
downloadvcpkg-654adc64b36607aff14f614387eb904d64faec2b.tar.gz
vcpkg-654adc64b36607aff14f614387eb904d64faec2b.zip
[portaudio] Fix build on windows (#13982)
* Build only static or shared library * Update CONTROL Co-authored-by: Nemirtingas <nanaki89@hotmail.fr>
-rw-r--r--ports/portaudio/CONTROL3
-rw-r--r--ports/portaudio/portfile.cmake7
2 files changed, 8 insertions, 2 deletions
diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL
index e93f1a6c3..ac11b5223 100644
--- a/ports/portaudio/CONTROL
+++ b/ports/portaudio/CONTROL
@@ -1,4 +1,5 @@
Source: portaudio
Version: 2020-02-02
+Port-Version: 1
Homepage: https://app.assembla.com/spaces/portaudio/wiki
-Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O. \ No newline at end of file
+Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake
index 38c2bdaba..7d9c95d84 100644
--- a/ports/portaudio/portfile.cmake
+++ b/ports/portaudio/portfile.cmake
@@ -7,6 +7,9 @@ vcpkg_from_git(
fix-include.patch
)
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic PA_BUILD_SHARED)
+string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static PA_BUILD_STATIC)
+
# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided
# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src
vcpkg_configure_cmake(
@@ -18,6 +21,8 @@ vcpkg_configure_cmake(
-DPA_USE_WDMKS=ON
-DPA_USE_WMME=ON
-DPA_LIBNAME_ADD_SUFFIX=OFF
+ -DPA_BUILD_SHARED=${PA_BUILD_SHARED}
+ -DPA_BUILD_STATIC=${PA_BUILD_STATIC}
OPTIONS_DEBUG
-DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON
)
@@ -34,4 +39,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
endif()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portaudio RENAME copyright) \ No newline at end of file
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)