Hi Miguel,
Please see my comments embedded below.
Regards,
Mikhail
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Miguel A. Figueroa-Villanueva
Sent: Wednesday, July 25, 2007 10:10 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Eclipse CMake Generator
Hello Everyone,
I'm new to this list, so I'm not sure if this is the right place for
my question. If not, I apologize and I would sincerely appreciate any
pointers on where I could find this information.
I'm interested in developing a CMake generator for Eclipse CDT. CMake
is a build generation tool like SCons, which will take an input file
(CMakeLists.txt) and create the project files of your choice (e.g.,
Visual Studio, Unix Makefiles, XCode, etc.). It has been adopted as
the build management tool for KDE 4.
So, what I would like is to add support to cmake to be able to create
the Eclipse project files from the CMakeLists.txt. The problem that
I'm facing is that I'm not really familiar with Eclipse... In an
attempt to sort out how difficult this task would be, I would like to
get help answering a few questions:
1. I assume that I only need to generate the .project and .cproject
files for the project and then import it with the eclipse gui. Is this
reasonable or am I missing something that is necessary for enabling
someone to open a project with eclipse and start compiling?
[Mikhail] Creating
the .project and .cproject files should be enough, although if possible, I
strongly encourage you to create the project programmatically using eclipse/CDT
API instead of generating the .project and .cproject files yourself since the
format of those files is internal and could be changed at any time. You might
want to look at the CDT Build System New Project wizard implementation to see how
the project is created programmatically. (void
org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler.createProject(IProject
project, boolean defaults, boolean onFinish) throws CoreException;
and IProject
org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard.createIProject(String name,
IPath location) throws CoreException
)
2. Can I have the .project/.cproject files in a directory different
from where the sources are?
[Mikhail] It is possible using the “linked resource”
concept. See the “New Folder” wozard implementation (org.eclipse.ui.wizards.newresource.BasicNewFolderResourceWizard).
If you need to generate the project files youself, then the link information is
specified in the “linkedResources” section of the .project file.
3. Is there a document somewhere that describes the format of the
.project/.cproject files?
[Mikhail] I don’t know of any documentation regarding the file
formats. Note again that the project files format is internal and is subject to
change.
Regards,
Mikhail
Thanks in advance for any help you can provide me with.
--Miguel
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev