Closed fgaz closed 7 months ago
I don't really know how to make makefiles, so someone else has to do this. Also it's important that CMakeLists.txt still works for Linux...
I don't really know how to make makefiles, so someone else has to do this
I know how to make basic makefiles, but I also don't really know cmake. On the NixOS package I'm applying the mac fixes externally. @OPNA2608 are you familiar with it and willing to give a hand? Otherwise I guess I can just dive into the docs and figure out something.
Also it's important that CMakeLists.txt still works for Linux
This shouldn't be a problem if all of the above fixes are applied conditionally
Sorry, I completely missed the ping :sweat_smile:. I pushed a PR that fixes the defines & library linking on macOS without breaking the Linux build.
this would make it possible to drop the ad-hoc
make-*.sh
scripts
Note that I only fixed the regular build process on macOS. make-macos.sh
does much more than just build though - it generates a universal x86_64/arm64 binary, constructs a macOS bundle & fixes up dependency paths with install_name_tool
.
All of that can be done with CMake as well, but it would require more changes than I'm able to test properly & have past experience with. As-is, it's not able to deprecate make-macos.sh
yet.
This has been fixed in the latest commit. Please let me know if it's still not correct!
In NixOS we use cmake to build this package, and I noticed that it'd only require a few CMakeLists.txt modifications to make it work on mac os too, namely:
__MACOSX_CORE__
instead of__LINUX_ALSA__
when building on mac os-framework CoreAudio -framework CoreMIDI -framework CoreServices -framework Cocoa
linking flags when building on mac os (not sure how this is done in cmake)asound
when building on linuxthis would make it possible to drop the ad-hoc
make-*.sh
scripts