-
Notifications
You must be signed in to change notification settings - Fork 183
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 support #46
Comments
@paulsapps what platforms are we missing? |
@arielelkin all work that I've compiled for - but CMake allows generation of VisualStudio,XCode,CodeBlocks projects etc. |
I can't speak for VisualStudio and CodeBlocks, but as far as Xcode is concerned there is support for cocoapods: https://github.com/thestk/stk/blob/master/iOS/README-iOS.md |
+1 for cmake, Visual Studio, Codeblocks etc. |
We have support for Is there anything more specific you'd require which can't be done with |
Well on windows nothing beats the speed of using ninja - CMake can target pretty much anything - including generating make files to use with make |
@paulsapps could you send in a PR for ninja support? |
I think the point of paulapps is supporting cmake, not creating another specific solution for ninja, right? |
Correct, ninja scripts are also not designed to be handwritten.. |
I dislike cmake. My 2 cents. |
I don't have an opinion on |
I'll be more descriptive, but note that my opinion is totally subjective: I do think the STK make configuration has long been lacking some maintenance.. running "make" and then "make" again causes it to re-run the linker for all the demo projects, and the examples don't re-use the library properly. It also uses Visual Studio-esque Release and Debug directories, but I don't mind this too much. However, these things can be fixed, or I'd be happy to upgrade the project to automake as we have done for RtMidi and RtAudio. I know that autotools is not to everyone's taste. But I have been made to use CMake on several other projects and although it has some clear advantages, I find it carries enough of its own demons which imho don't make up for what it provides. First and foremost that it is an utterly horrible "language" to program in, much worse even than M4+shell script. Admittedly the Visual Studio and XCode support may be something, but I have yet to understand why people are willing to bend so far backwards to keep things working on Windows and non-FOSS dev environments. I stopped doing so long ago.. if it compiles in MingW that's good enough for me, personally. All that said, I also think I am not alone in thinking that there is far too much messing around with build systems and the like on the Rt* and STK projects, instead of contributions related to the actual code. Someone comes along on literally every project I contribute to and wants to change the entire build system. This happens all the time lately, and it's tiring. Not just because it's boring to mess with build systems, but because it's more code to maintain. I can point to some projects that have like 3 concurrent build systems just to satisfy people's whims. I guess it's a github thing, because this was a much more rare phenomenon when projects were hosted on Sourceforge. In any case it's annoying to worry about unit testing all of that, my reflex now is to just say "no" to build system changes, unless it actually fixes a build problem. THAT said, I understand that people have different preferences, and so my policy on other projects has been, if you really prefer CMake, go ahead and propose a way (with a PR) to integrate it gracefully, i.e. keep it in a subdirectory and not interfering with the rest of the project. Think of it as an add-on instead of a replacement. I forced someone to deal with this compromise on liblo and it turned out pretty good. I'd prefer people just help fix the makefiles that already exist. |
I completely agree with this and I myself have been very disappointed and frustrated with how much time is spent dealing with build system issues. The whole point of STK, RtMidi and RtAudio is to offer C++ classes to help simplify audio signal processing programming. How one includes them into a project (pick and choose, library, …) is completely up to you. The limited build system that comes with STK is there to verify the code works. If others want to make more elaborate updates to the build system, that is ok and we can include them in the distribution, but I would not be in favour if they involve a lot of extra “baggage” added to the distribution and the download of extra binaries to use them (other than what comes standard with most compilers). |
The benefit of CMake is that you can target any build system, so you still use make after running CMake which generated the make file, or you use CMake to generate sln for Visual Studio and its compilers, or scripts for ninja/CodeBlocks/XCode on mac etc. On windows using make is a pain with visual studio, in the end you have to create visual studio projects. And you need a project/solution per version of visual studio which is even more painful. In my use of the STK I just ended up adding the files into a static lib with CMake:
|
Looks good, Paul. Do you think you could send in a pull request? |
Yeah but it might not be for a few weeks though, I'll get around to it eventually. |
I spent the morning figuring out how to get the STK fully working in CLion (which uses CMake only). The following is a full
|
@radarsat1 If using automake implies using libtool to make the shared libraries, then I would welcome that as it would fix #86. |
I think it would be nice to have CMake support for easier cross platform compiling?
The text was updated successfully, but these errors were encountered: