[cmake-developers] CMake user-provided manifest files
James Johnston
JamesJ at motionview3d.com
Wed Sep 16 15:43:52 EDT 2015
> -----Original Message-----
> From: cmake-developers [mailto:cmake-developers-bounces at cmake.org]
> On Behalf Of Brad King
> Sent: Wednesday, September 16, 2015 15:05
> To: James Johnston; Gilles Khouzam
> Cc: cmake-developers at cmake.org
> Subject: Re: [cmake-developers] CMake user-provided manifest files
>
> On 09/14/2015 04:16 PM, Brad King wrote:
> > I think our path forward here is to teach the Makefile and Ninja
> > generators how to add user-specified manifest files to the "mt"
> > invocations as outlined above.
>
> I've drafted support for this in all generators, with a test:
>
> Add support for *.manifest source files with MSVC tools
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74fee403
>
> Please try it out.
Thanks - looks promising! I tried with Ninja generator from a VS2008
command prompt. But I ran into some issues with paths being converted to
relative paths. A sample test case is attached. Build it with the Ninja
generator.
I also tried VS2008 generator directly. That seems to work without error.
The Ninja problem seems to be due to this:
>From build.ninja:
build subdir\ManTest.exe: C_EXECUTABLE_LINKER__ManTest
subdir\CMakeFiles\ManTest.dir\Hello.c.obj | subdir\DPIAware.manifest
MANIFESTS = DPIAware.manifest
PRE_LINK = cd .
Corresponding rule:
rule C_EXECUTABLE_LINKER__ManTest
command = cmd.exe /C "$PRE_LINK &&
C:\Users\JamesJ\AppData\Local\Temp\cmake-build\bin\cmake.exe -E vs_link_exe
--intdir=$OBJECT_DIR --manifests $MANIFESTS --
C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe <snip> && $POST_BUILD"
So the problem is the current directory when linking is going to be root
CMAKE_BINARY_DIR, and the relative path "DPIAware.manifest" will attempt to
be used, which of course isn't there as it needs to look in
"subdir\DPIAware.manifest".
This leads to this error:
DPIAware.manifest : general error c1010070: Failed to load and parse the
manifest. The system cannot find the file specified.
Best regards,
James Johnston
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ManTest.zip
Type: application/x-zip-compressed
Size: 1301 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150916/6dca64e3/attachment-0001.bin>
More information about the cmake-developers
mailing list