Open dhdaines opened 2 years ago
Hi, @dhdaines , can you show your cmake code that link portaudio to your own code?(Especially find_package
and target_link_libraries
parts)
https://github.com/PortAudio/portaudio/issues/748#issue-1431040914
In the issue opened by myself, I can NOT find the correct way to link portaudio to my own code.
Thanks! :handshake:
Hi! It's a bit convoluted because there are many, many ways to find portaudio:
https://github.com/cmusphinx/pocketsphinx/blob/master/examples/CMakeLists.txt
What consistently works for me, on both Linux and Windows (using CMake under vscode) is:
Portaudio will then be found! If you have it installed in a different place then you need to set CMAKE_PREFIX_PATH to the CMAKE_INSTALL_PATH that was used to install it (not to the directory containing its .cmake files).
There are probably other ways to do this...
The current situation is that the main maintainers, including myself, don't know anything about CMAKE, and the guy that changes all the CMAKE stuff is unresponsive.
It sounds like you know more than us, would you be able to give us a pull request or tell us exactly what to change in the documentation? Thank you.
The current situation is that the main maintainers, including myself, don't know anything about CMAKE, and the guy that changes all the CMAKE stuff is unresponsive.
It sounds like you know more than us, would you be able to give us a pull request or tell us exactly what to change in the documentation? Thank you.
Sure, the change is pretty small. I can look over the other CMake stuff (though I am far from being an expert or even a fan of CMake...) as well.
Do you maintain CMake and Visual Studio build systems separately? Ideally you would just generate VS/VSCode from CMake or even just provide CMake since Visual Studio 2022 supports it direclty, but there is a bit of a learning cuve there unfortunately...
@dhdaines I think you should consider my problem, thanks. https://github.com/PortAudio/portaudio/issues/748#issuecomment-1340659368
@dhdaines not a fan myself. all in all we maintain legacy MSVS project, CMake and ./configure
Are @dhdaines speaking about documentation line: https://github.com/PortAudio/portaudio/blob/daaf637f6f9fce670031221abfd7dfde92e5cce3/doc/src/tutorial/compile_cmake.dox#L43
Closed the previous bug as it resulted from confusion between the release and the code from Git.
For the release, the only problem with the documentation (http://files.portaudio.com/docs/v19-doxydocs/compile_cmake.html) is that you must set
CMAKE_PREFIX_PATH
to theCMAKE_INSTALL_PATH
where you installed PortAudio, notCMAKE_MODULE_PATH
.For the Git snapshot, the documentation is not at all valid, as the name of the package and the way it is used have totally changed.