|
From: justnope <spa...@te...> - 2019-02-13 17:58:37
|
I found a mistake which resulted in a compile error when I tried it with gcc, added an install option in the cmake file and split it into libgig & libakai so it's the same as the makefile. On 12/02/2019 17:37, Christian Schoenebeck wrote: > Looks fine to me. Just one last thing: You added CMake files and I wonder what's > better, placing those CMake files directly at the individual locations like you > did, or rather putting them into a dedicated subdir like "msvc" altogether. > The thing is, obviously right now we do not support cmake on Linux etc., so it > is not a real issue yet. But one day somebody will ask for compiling libgig > with cmake on other platforms as well. It's very easy to put it in a separate dir, let me know if you prefer that. > Obviously the best way would be sharing the CMake files among all platforms and > just wrapping the architecture/compiler specific portions with conditions. > Would that be easily possible? Last time I looked into this with cmake I think > there were some substantial limitations, but I can't remember anymore what > exactly. I also work on lmms and there we compile for windows, mac, linux. For windows we can cross-compile with mingw or use msvc directly. This is done with shared cmake files for all combinations. If there's a limitation, I haven't encountered it so far. It's easy to do with conditionals in cmake. What's more tricky is using the right conditionals. For example, you have to make a distinction between platform and compiler. So if the variable WIN32 is defined you can't assume it's msvc that's being used since we can also cross-compile. There's also several combinations possible of which systems you want to support for finding the libraries you link to (pkg-config, cmake config,...) . You have very few dependencies so that won't be a problem. It depends which combinations you want to support and how far you are prepared to go into the rabbit hole. |