[CMake] Building both a .com and .exe executable on Windows.

J Decker d3ck0r at gmail.com
Wed May 7 00:56:15 EDT 2014


On Tue, May 6, 2014 at 5:54 PM, Michael Oldfield <
sag_mal_pluesch at yahoo.com.au> wrote:

> On 07/05/14 00:25, Rick McGuire wrote:
> > Working on converting an existing project to cmake, which is going
> > fairly well.  I've found answers to most of questions with some quick
> > google searches, but I've run into an issue where I've not managed to
> > find any answers yet.
> >
> > One part of the project generates two executables with the same name.
> >  The first is a non-console executable with a .exe extension, the second
> > is a console version with a .com extension.  I know how to build the
> > first, and I can build the second if I give it a different name and use
> > a .exe extension, but I've not found a means of getting cmake to
> > generate an executable with a .com extension.  Has anybody needed to
> > deal with this issue before?
>
> Perhaps try set_target_properties?
>
> set_target_properties(MY_COM_TARGET PROPERTIES SUFFIX ".com")
>
>
that just sets the name, doesn't make a real .com; I don't think cmake has
that support... have to add link flags probably also


> It's a long time since I've used this, so I can't remember whether you
> need the '.' in the property.
>
> Michael
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140506/08a5936a/attachment.html>


More information about the CMake mailing list