Cmake vs .pro
I’m working on an existing program. It is compiled with Auto Compiler and QT3 SDK.
I’ve got too choices, develop a cmake or a .pro project, three if you have another idea. I’m new at this IDE.
The first question about the cmake version:
When you design, say a control on the QT Creator, and compile it with cmake how and when is a *.base.h file made? For each control ( widget ) of the existing program I have a *.h , *.base.h *.cc and the *.ui . The *.h file has a preprocessor statement #include *.base.h . Those files did not come with the source. So I am assuming this is somehow generated during a compile, and somewheres in one of the QT libraries. The only reference I found was that, that file name is equal to the identifier in the ‘design’ module, without the the dot or the .h
The first question about a .pro version
Is there actually a way to import a cmake project? I found a script we could test, but no instruction on how to go about it? Or do you need to redo the controls from scratch and just insert the actual code?
Just in case, this is my first Open Source, and with my luck the maker is currently not around, but it is a very well done OpenGL project, worth while to upgrade for today’s game makers. :D
I really do not get what you want to do.
You got some code. Which ToolKit/Toolchains/OS(es) was that designed for? What do you want to do with that code? Port it? To which platforms/Toolkits/OSes?
Once we know that we may be able to provide some hints on which build system to recommend. In an ideal world a buildsystem would be a mere implementation detail anyway;-)
To Tobias Hunger
I wish I had answers to all your questions, that’s what I wanted to ask the maker.
Here is what I know.
The program is called Misfits 3D Modeler.
It comes in two versions, a tar ball and an exe installer for Windows.
The original program used LUA scripts and introduced QT mainly for the GUI portions. Later snapshots expanded the functionality with basic C++ classes.
It is supposed to compile on a Linux OS with a program called Auto Compiler. I can’t compile it on my Windows. :( It looks for files that definitely did not come with the source code package. – The ready made Windows version works on Windows XP and on Winodws 7.
Goal, make a source code my friends can download, program and recompile with MingW. That would be simple, all I would need to to is to redo the GUI portion.
Toolkit to be used: QT SDK only, nothing else planed for the moment, QT has more than I need.
Platform(s): Windows, Linux.
The catch: how do I address the Linux users? Those who worked on the original program, may become interested again, when new features are introduced into it. So I found a cmake script that is supposed to compile the program as well. Apparently Linux users expect to download a program and compile it themselves.
A Cmake set-up will generate the *.base.h file that I mentioned ( I can not explain the logic behind this two pass compiler ) in my first post. But the source code needs to reflect that. Therefore I need to compile with cmake, copy the generated source files over to the Windows MingW target and compile with MingW. Unless there is a better way.
A .pro set-up ( with MingW) will work for me, because this is how I used to make programs. Using a .pro set-up, is there a way to make it the Linux Way as well, by giving the end user a code ( tar ball ) that compiles with a couple of console commands? :)
Assuming you are talking about this: Misfit 3D Modeler [misfitcode.com] That is an open source project actually housed on SourceForge!
Why don’t you just contact the author and ask whether you can help out with the project? I am sure he will gladly accept your offer (and coding is so much more fuin when doing it in company:-).
Anyway: A open source project grants certain rights to the user, including the right to change the code. So it actually has to ship some kind of way to build it after the user changed it:-)
Just check the source directory for a file called INSTALL, README, etc. there is bound to be instructions available on how to build this piece of software.
To Tobias Hunger.
The original maker was already contacted, before my posts here.
The source code came with instruction on how to build it on Linux. Those seem to be working. (I have no Linux). Now I’m trying to figgure out how to make it work in Windows.
p.s. Yes, it’s better to work under the original programmer, but the last update was 2009, and the contact links on the web site and on source forge do not function :(
To Tobias Hunger
Sort of. LOL That gave me a lot of error messages regarding the registry, char and and so on. But I forgot. That’s one of the reasons two people are better on projects!
I’ll try that again, I fixed the registry related files anyways, had too, since I need it work on 64 bits :)
Thanks for your last post!!!! :D
Update: 19:41 09.11.2010
nothing doing. :(
The MingW has the same problem as cmake! This is good news actually, I thought I’m a complete (blank). The Makefile.mingw asks for files that I do not have.
The tar-ball, has *.ui files included. Those need to become .h files that I think only QT can produce, since it matched the control-name in the actual form. Once I the ui forms are converted into those .h files the MingW should be able to compile. This is hard to explain.
alignwin.ui needs to become alignwin.base.h.
I base that conclusion on the manifesto.
MM3D_UI= \ src/qtui/alignwin.base.h \ etc.
Any ideas are more than welcome. :)
CMake usually has some macros to convert .ui files into C++ code files using Qt’s uic. I am afraid you will now need to dive into the CMake build system! It is not that complicated, you will manage.
CMake has a great build-in help by the way:
- cmake --help-html [filename]
I am afraid you will now need to dive into the CMake build system!
:) Thanks again for your input! Not sure how to make this topic ‘solved’ but the original question is answered. I’m not going to post again, when I figured out Cmake, it’s not part of the thread.
b.t.w. It doesn’t matter what I need to do. Now I have a clear path and do not need to wonder am I on the right track. Plus if the original programmer(s) ever comes back, no surprises for them, they put a lot of work into this program.