mettli / glfx

Automatically exported from code.google.com/p/glfx
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

New build system #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I just looked at the build system on Linux, and oh well, what can I say... I 
was practically horrified.
We need to switch from automake asap. CMake and SCons sound like good 
alternatives. Lets decide which way to go and stick with it.
The only exception for now, is that I don't want to give up on MSVC files.

Requirements:
1. Build scripts should be easy and intuitive to modify
2. Should support less common configurations (like MiniGW)
3. Should be clear about what is the selected build (64/32 bit, shared/static 
lib)
4. All build scripts should be confined to one directory (to reduce pollution)
5. Intermediate files created by the build system and the compiler should be 
cleanable without using source control
6. Should produce simple output during compilation. Seeing long lines of "gcc 
......." doesn't help anyone. More verbose output should be achievable with 
parameters.
7. In case of installation, should tell where it's going to put the files

Original issue reported on code.google.com by max.snif...@gmail.com on 4 Apr 2013 at 2:53

GoogleCodeExporter commented 9 years ago
I think both CMake and Scons would meet the requirements. However, CMake has a 
much larger user base and has been integrated into QT Creator as a standard 
build system. You should try building GLFX with QT Creator on Linux. Steps are 
as follows: File-> New File or Project->Import Project->Subversion 
Checkout->Choose. Then enter repository URL, enter checkout directory, click 
next and then click finish. Then optionally you can set the build path to be 
the same as the checkout path or leave the default, click next, click run 
CMake, and click finish. You will have downloaded and built GLFX from the 
repository in less than 2 minutes. You can then use the subversion options 
under tools to commit or whatever else. It is extremely eloquent and has been 
the way I made all my commits so far. Though you will probably need to install 
subversion first by typing "sudo apt-get install subversion" in the terminal. 
You should give it a try and see what you think.

Original comment by ad...@ovgl.org on 5 Apr 2013 at 10:49

GoogleCodeExporter commented 9 years ago
OK, I'll start with CMake. I'll give it a few rounds and see how it goes. 
Though I'm more of command line kind of guy, so I'll probably skip the QT 
Creator.

Original comment by max.snif...@gmail.com on 6 Apr 2013 at 1:11

GoogleCodeExporter commented 9 years ago
I that case just download using svn and type: cmake -G "Unix Makefiles"

However, I still think you should try building it with QT Creator on Linux and 
using the GUI for Visual Studio on Windows just to see how it works in that 
regard. Also maybe try it with code blocks as well.

Original comment by ad...@ovgl.org on 7 Apr 2013 at 12:45

GoogleCodeExporter commented 9 years ago
That's what I did. It worked quite well.
Is there a way to pass command line arguments to the build?

Original comment by max.snif...@gmail.com on 7 Apr 2013 at 10:57

GoogleCodeExporter commented 9 years ago
After playing around a bit with CMake, I think this is the way to go.

Original comment by max.snif...@gmail.com on 8 Apr 2013 at 12:20