microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.27k stars 6.18k forks source link

[portaudio] c++ binding not installed #7532

Open YukinoHayakawa opened 4 years ago

YukinoHayakawa commented 4 years ago

Is your feature request related to a problem? Please describe.

PortAudio comes with a cxx binding in its source under "bindings/cpp" as noted by its website. However, vcpkg does not install or build it as a part of the installation of the port (I didn't find any related headers in vcpkg\installed\x64-windows\include), so the user cannot conveniently use this official binding.

Proposed solution

Install this binding as a part of portaudio.

Describe alternatives you've considered

This binding itself has a cmake build file so maybe we can add another port which depends on the current one.

Additional context

N/A.

nyanpasu64 commented 4 years ago

This binding itself has a cmake build file so maybe we can add another port which depends on the current one.

I was unable to find any CMake files to build the bindings, in either http://portaudio.com/archives/pa_stable_v190600_20161030.tgz or https://app.assembla.com/spaces/portaudio/git/source master. What portaudio revision and which file are you talking about?

NancyLi1013 commented 4 years ago

Hi @YukinoHayakawa thanks for posting this issue. As @jimbo1qaz said above, I cannot find any CMake files to build the bindings either.

YukinoHayakawa commented 4 years ago

Sorry that I haven't been working with the library for a while. If I get a change to use it later again I'll try to post my update here.

nyanpasu64 commented 4 years ago

I ended up bundling portaudio directly with my app. I wrote a CMakeLists.txt for portaudiocpp, hosted at https://gitlab.com/nyanpasu64/exotracker-cpp/blob/master/3rdparty/portaudio/bindings/cpp/CMakeLists.txt.

Note that it isn't the cleanest code, since it uses GLOB instead of a list of files. I recorded the output of the GLOB: https://gist.github.com/jimbo1qaz/14740fcaff6d2671b384e1caeb32cff2

Additionally my code only handles statically-linked portaudio and portaudiocpp. The important lines are:

target_include_directories(portaudiocpp_static PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include")
target_link_libraries(portaudiocpp_static PRIVATE portaudio_static)

portaudio has a library portaudio for dynamic linking, and portaudio_static for static linking. I don't understand how find_package works, but it seems like there's some discussion on target names at https://github.com/microsoft/vcpkg/issues/6045#issuecomment-482333306

NancyLi1013 commented 3 years ago

C++ bindings will be moved to a new repo.

https://github.com/PortAudio/portaudio/issues/548

Febbe commented 1 year ago

I've added a CMakeLists.txt to the c++-binding subdirectory of portaudio, so it might be easier to provide that package. They want to split both projects, but it won't happen that soon, because they are very busy, I think.

Febbe commented 3 months ago

@Cheney-W, any updates on this?