Closed SeleDreams closed 3 years ago
Hello there. FWIW, here goes my attempt to add CMake support for WORLD: https://github.com/r9y9/World-cmake. I've been using it over a year and had no problem with it so far.
I personally agree that cmake is more convenient than pure makefiles and can be used for various platforms (Windows, Mac OS X, Linux, etc). Although we can do it by forking the repository, it would be great if the official repo supports cmake.
EDIT: over a year -> over years :)
Thank you for your request and comment. I checked it and think that it is reasonable to add the cmake file, as you pointed out.
On the other hand, there are two ideas (from @SeleDreams and @r9r9 ), and I waver between them. The first idea seems to be more straightforward because the second idea requires to add other files. If the second idea is better than the first idea, I'd like to accept it as another PR.
I guess either would work
My solution was more meant to allow to easily build on any platform while keeping the maintaining cost low (to avoid having to modify it too much when changing stuff)
so basically mine is really the "simple and easy option" now for something that is more advanced I guess the second works as well.
also, mine builds WORLD as a shared library, on Linux it would be a .so, on Windows a .dll and on OS X a .dylib I felt like it was adapted as WORLD can most of the time work well as a library for most applications and would make it easily modular
Thank you for your comment.
I am going to accept your request soon.
Since the project only had Makefiles and visual studio solutions, I felt like a CMakeLists would be useful as they are a unified way to build C/C++ programs on any OS and any IDE. So I made one, I might also make some for the example projects but at the moment I only made one for WORLD itself. It at the moment builds WORLD as a shared library.