8000 Fix cpp building cmake by rn3kk · Pull Request #961 · PortAudio/portaudio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix cpp building cmake #961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix cpp building cmake #961

wants to merge 1 commit into from

Conversation

rn3kk
Copy link
@rn3kk rn3kk commented Sep 16, 2024

add LIBRARY_BUILD_TYPE to portaudiocpp

Need for fix static build as subproject (thrid-party)

add LIBRARY_BUILD_TYPE to portaudiocpp
@RossBencina RossBencina added bindings-cpp C++ bindings in /bindings/cpp build-cmake CMake build system labels Sep 26, 2024
@RossBencina RossBencina added this to the V19.8 milestone Sep 26, 2024
@philburk
Copy link
Collaborator
philburk commented Oct 3, 2024

@rn3kk - Thanks for this patch. Since you are building the CPP binding, could you please take a look at #939, and a possible fix in #963, and make a comment.

@philburk
Copy link
Collaborator
philburk commented Oct 3, 2024

I am not a CMake expert. But would it be better to just build BOTH libraries using something like:

add_library(portaudiocpp_shared SHARED ${portaudiocpp-sources})
add_library(portaudiocpp_static STATIC ${portaudiocpp-sources})

@RossBencina
Copy link
Collaborator

I am not a CMake expert, but I think we need to go back to building both static and shared libs in the main PortAudio cmakelists. It is a regression that this functionality was removed, see

#486

and other related tickets:

https://github.com/PortAudio/portaudio/issues?q=is%3Aissue+is%3Aopen+label%3Abuild-cmake

@philburk philburk added the P4 Priority: Low label Oct 18, 2024
@RossBencina
Copy link
Collaborator

This issue needs to be fixed but we're not currently convinced that this is the correct fix. Hence assigning low priority to this PR.

It would be good if someone can create an issue to track the actual bug that this PR is supposed to fix (i.e. the specific problem building the C++ binding).

@RossBencina
Copy link
Collaborator

Removing from milestone. No response for 6 minths. We have no maintainers for Cmake. We have not received any help in understanding whether this is the correct fix. Happy to contine the discussion, but this can't hold up releases.

@RossBencina RossBencina removed this from the V19.8 milestone Apr 24, 2025
@dmitrykos
Copy link
Collaborator
dmitrykos commented Apr 25, 2025

@RossBencina I can handle this question but in a different way. I already checked how C++ bindings are built and currently it is overly complicated - building C++ lib is detached from building of the main PA library. I can't build C++ bindings easily on Windows with MSVC currently as find_package package fails. Current implementation is probably Ok for Linux but not for generic Windows building experience.

I propose to simplify building C++ bindings by making them a byproduct of building the PA library. In this way CMake interface will provide an option to build C++ buildings PA_BUILD_CPP_BINDINGS. This approach will greatly simplify the CMake code for building C++ bindings and it will be more portable. Then will add option to make C++ bindings static or shared (similar to the intention of the given PR).

If you are ok with this approach I will develop a PR for further discussion and integration. Please let me know your opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings-cpp C++ bindings in /bindings/cpp build-cmake CMake build system P4 Priority: Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0