Open d0p1s4m4 opened 4 years ago
Hey i highly advice to use Github Actions instead of travis now supporting OSX, Windows and linux directly from github
Makefile and old build system can coexisting with CMake this is not a problem.
mkdir build && cd build && cmake ../
create a Makefile in the build directory, let the choice to the user of which build system he want to use
You can add the following line at the top of the CMakeLists.txt:
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the source code and call cmake from there")
endif ()
So the user is aware that he need to create a build directory and call CMake from here
Don't forget also that the project is made for school learning of graphics.
You cannot remove the old build system, because students have to learn how works Makefile before using a generator of Makefile. So both need to be supported.
@Damdoshi Work in a school as a pedagogical lead. His students will probably learn how to do their own makefiles and use bunny library from a raw Makefile
I think doing a CMakeLists.txt is a great idea.
But I think that contrary to the classic Makefile we will have to customize much more to build on a maximum platform
I already told @Damdoshi , that by default the liblapin incorporates too many things, things we do not necessarily need (based on CMake options), with CMake we will be able to detect the sources we need before generating the static library, much more flexible, (pay for what you're really going to use)
The huge advantage that CMake will bring here is that for example for SFML we can build at the time of build the liblapin and thus avoid installing a package for SFML on its operating system, it is what I do in my personal project
Hello,
Thank you for your contribution. I think it will certainly be added, I just have to take the time to check it seriously... as I'm not well versed into cmake. Milerius is right about the fact I may need to keep a Makefile for educational purpose, but it does not remove the beneficial of having a cmakelist. It would be great to ease the future splitting.
Good night x')
First I'll understand if this PR is rejected, because I change the whole build system.
But I'll explain why:
What this PR include:
/!\ This PR is work in progress but it's work. It's more as an PoC (quick'n'dirty), in order to demonstrate and ask if it's okay before working much deeper on it (clean code and add others tests)