SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.63k stars 1.11k forks source link

Can we simplify our buildsystem? #213

Closed franciscod closed 9 years ago

franciscod commented 9 years ago

This whole windows thingy got me thinking... The CMakeLists describe the deps and the build process. Why bother with ./configure at all? Should we remove it? What about buildsystem/simple?

Take a look here https://github.com/Unvanquished/Unvanquished, they have so few cmake and just 3 CMakeLists.txt! I bet we can shrink everything to a single CMakeLists.txt on openage! But, should we?

I'm tempted to say yes :grinning:

# Unvanquished's buildsystem
% find . -name "*.cmake"
./cmake/FindNettle.cmake
./cmake/FindSpeex.cmake
./cmake/FindGeoIP.cmake
./cmake/cross-toolchain-mingw64.cmake
./cmake/cross-toolchain-mingw32.cmake
./cmake/FindCursesW.cmake
./cmake/FindVorbis.cmake
./cmake/cross-toolchain-linux32.cmake
./cmake/FindTheora.cmake
./cmake/FindOgg.cmake
./cmake/FindOpus.cmake
./cmake/FindWebP.cmake
./cmake/FindGMP.cmake
./cmake/FindGLEW.cmake
./cmake/FindSDL2.cmake
./cmake/CMakeParseArguments.cmake
% find . -name "*CMake*"
./cmake/CMakeParseArguments.cmake
./CMakeLists.txt
./src/tools/lcc/CMakeLists.txt
./src/libs/libRocket/CMakeLists.txt
TheJJ commented 9 years ago

Reducing the buildsystem complexity is next to impossible, as we depend on code generation and stuff. We tried splitting up all the components to cmake modules instead of having one single monolithing CMakeLists.txt in the root.

Sure we can try simplifying it further, but i doubt this is possible without loosing functionality.

TheJJ commented 9 years ago

./configure is a convenience tool for the developers, packagers don't need to use it. Otherwise you as developer would have to do the cmake invokation and specify optimization flags yourself.

Your main point seems to be reducing the number of buildsystem files, but i doubt merging stuff to one file will increase simplicity even a bit.

If other ideas come up, feel free to reopen.