[CMake] Release build problem with .exe manifest files.

Rick McGuire object.rexx at gmail.com
Tue May 13 15:40:37 EDT 2014


I have a project that needs to use a specific manifest file when generating
.exe files.  I was able to get this working by specifying the /MANIFEST and
/MANIFESTFILE options on CMAKE_EXE_LINKER_FLAGS.  This works great with the
debug build, but today I finally got around to checking out that the
release build was working correctly.  With the Release build, I'm getting
an error complaining that it can't parse the manifest file.  I suspected at
first the file name was getting messed up on the link command, so I ran
nmake with VERBOSE=1 to see what options were getting used.  The link
command looked ok, although there was an extra /MANIFEST option getting
specified.  The error was coming from a call to mt.exe that was occurring
after the link completed.

Why is this being handled differently between the release and debug builds?
 Is there anything I can do to turn off that mt.exe step, or do I need to
resort to a two step solution such as the one described here:

http://stackoverflow.com/questions/6335352/how-can-i-embed-a-specific-manifest-file-in-a-windows-dll-with-a-cmake-build

I really prefer my solution, since I can handle the problem for all of our
.exes right up front without needing to add a bunch of extra conditional
windows-only steps throughout the configuration file.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140513/53ae7443/attachment.html>


More information about the CMake mailing list