-
Notifications
You must be signed in to change notification settings - Fork 307
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
CMake rewrite + feature completion using modern CMake best practices #461
Conversation
aaba4bd
to
5905aff
Compare
I have confirmed this works on Windows building Mixxx: mixxxdj/mixxx#3594 |
0bbd49c
to
45830e7
Compare
This annoying |
49b7535
to
2d4d7d5
Compare
2d4d7d5
to
0f7ab8f
Compare
The new autodownloading of the ASIO SDK allows for adding an |
Autodownloading was discussed in the old portaudio vcpkg-package, and rejected, because of Steinbergs license conditions. Back then the compromise was to require the user to place the SDK in a certain folder, and ASIO would be included automatically. |
Here is that old vcpkg pull request. That was before vcpkg had the ability for packages to have optional features. In the port I linked above which we are using for Mixxx on Windows, the user must explicitly specify to build |
0f7ab8f
to
ab02874
Compare
0f7ee8c
to
0e3b934
Compare
Woo! I got the JACK host API building on Windows with both MSVC and MinGW. 🎉 I don't think this was possible with any of the build systems before. This requires using the TRE library for POSIX regular expressions because neither Windows nor MinGW have a regex.h header. For MSVC, it also requires pthread4w for pthread.h. Both of these libraries are available in vcpkg which I have setup on GitHub Actions. The JACK library also comes from vcpkg. The jack2 vcpkg port does not build the real JACK library nor JACK server. It builds JackWeakAPI which is a shim that dynamically loads the real JACK library and forwards API calls to it. When this is released, I will update the portaudio vcpkg port upstream and make it easy to build with JACK for Windows and MinGW. Unfortunately I could not get the JACK host API to link on MinGW on Ubuntu. I tried every combination of static/dynamic JACK/PortAudio but ran into different linker errors each time. This might be some peculiarity of vcpkg or MinGW, or an interaction between them. Considering that building the JACK host API works with MinGW on Windows, I think the CMake modules should be able to build with MinGW on Linux. The JACK host API is also built on macOS using the jack package in Homebrew. A few tiny changes to pa_jack.c were required. I could split those off to another PR if that is desired. Let's get this merged. |
931af4b
to
ba369c8
Compare
@Be-ing wrote:
Yes, please remove all of your changes to the Last week I asked you to not make any more (unrequested) changes to the PR. Now you have made further changes. In order for us to converge we need the code to be stabilised, not to have continual unrequested revisions. Phil and I have spent the majority of our limited time for the past several months dealing with your revisions to this PR. This has gone far enough. Please do not make unrequested changes again. |
+1 to what Ross said. It is very important that PRs have a minimal set of changes and that the changes slow down and then stop when we get close to merging. Having an overly large PR that keeps changing makes it impossible to converge. It is much easier to merge multiple small PRs than one large one. |
Done.
You did indeed and I apologize for not listening to that. I should have started the recent work on a new branch. The recent changes are in the cmake/Find****.cmake modules; the main CMakeLists.txt has not substantially changed. |
@Be-ing - it is merged! Yay! Thanks for this great contribution and for persevering through the lengthy review process. |
Yay! Could you make the separate Git repository for the C++ bindings so I can get CMake working with those? |
This branch is on top of #459.
Rewrite CMakeLists.txt using CMake targets and modules instead
of building up source files in variables.
Refactor to use standard CMake variables, notably
BUILD_SHARED_LIBS instead of always building both dynamic and
static libraries. Also use CMAKE_FRAMEWORK for building as a
macOS framework.
Remove superfluous PA_ prefixes from option names.
Automatically download ASIO SDK from Steinberg if it is not found.
The path to the SDK can be manually specified with
ASIO_SDK_ZIP_PATH to facilitate caching on CI.
Add support for OSS (off by default).