[CMake] Creating a visual studio project with non .cpp or .h
files in it.
Josef Karthauser
joe.karthauser at geomerics.com
Thu Dec 6 05:54:23 EST 2007
It would be useful if there was a standard way of doing this within
CMake; maybe there is in 2.6?
Anyway, I boiled your ideas down into a single 'ADD_DOCUMENTATION()'
command - see attached patch to 2.4.7. It should probably be called
ADD_AUX_FILE() or something though, as we also use it to add external
foo.cmake files to the visual project files for ease of editing within
the Visual Studio environment.
Joe
> -----Original Message-----
> From: Sylvain Benner [mailto:benner at virtools.com]
> Sent: 05 December 2007 14:28
> To: Josef Karthauser
> Cc: CMake ML
> Subject: Re: [CMake] Creating a visual studio project with non .cpp or
> .h files in it.
>
> Here is a missing function body added to cmMakeFile.
> I would be glad to hear from the CMake makers of any issues using this
> hack, thank you.
>
> cmTarget* cmMakefile::AddGlobalTargetMP(const char *targetName,
> const std::vector<std::string>
> &srcs)
> {
> cmTarget target;
> target.SetType(cmTarget::UTILITY, targetName);
> target.SetInAll(true);
> target.GetSourceLists() = srcs;
> target.SetMakefile(this);
> this->AddGlobalLinkInformation(targetName, target);
> cmTargets::iterator it =
> this-
> >Targets.insert(cmTargets::value_type(targetName,target)).first;
> this->LocalGenerator->GetGlobalGenerator()->AddTarget(*it);
> return &it->second;
> }
>
> --Sylvain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_documentation_command.patch
Type: application/octet-stream
Size: 5834 bytes
Desc: add_documentation_command.patch
Url : http://public.kitware.com/pipermail/cmake/attachments/20071206/9ee70056/add_documentation_command.obj
More information about the CMake
mailing list