MantisBT - CMake
View Issue Details
0015433CMakeCPackpublic2015-03-06 08:082015-11-02 09:13
Mark Stijnman 
Nils Gladitz 
normalminoralways
closedfixed 
CMake 3.1.3 
CMake 3.3 
0015433: CPack WIX creates incorrect .wixobj filenames for CPACK_WIX_EXTRA_SOURCES
When using CPACK_WIX_EXTRA_SOURCES with filenames like MyProject.fragment1.wxs and MyProject.fragment2.wxs, in both cases the filename generated for the .wixobj file for the candle command is MyProject.wixobj, stripping both extensions. When you do this, the light command will therefore be trying to link MyProject.wixobj twice, leading to duplicate definition errors.
Run the attached minimal test case, which includes two fragments that each define a single property, 'Fragment1Prop' and 'Fragment2Prop'. When you build the PACKAGE target, it will fail with an error "error LGHT0091 : Duplicate symbol 'Property:Fragment2Prop' found."
The solution is to change the call to cmSystemTools::GetFilenameWithoutExtension, in cmCPackWIXGenerator.cxx, line 274, to a call to cmSystemTools::GetFilenameWithoutLastExtension.

A workaround currently is to just use a different naming convention, like MyProject_fragment1.wxs.
No tags attached.
zip testcase.zip (1,889) 2015-03-06 08:08
https://public.kitware.com/Bug/file/5399/testcase.zip
Issue History
2015-03-06 08:08Mark StijnmanNew Issue
2015-03-06 08:08Mark StijnmanFile Added: testcase.zip
2015-03-06 08:09Nils GladitzAssigned To => Nils Gladitz
2015-03-06 08:09Nils GladitzStatusnew => assigned
2015-03-06 12:31Mark StijnmanNote Added: 0038167
2015-03-09 09:59Nils GladitzNote Added: 0038185
2015-03-09 09:59Nils GladitzStatusassigned => resolved
2015-03-09 09:59Nils GladitzFixed in Version => CMake 3.3
2015-03-09 09:59Nils GladitzResolutionopen => fixed
2015-11-02 09:13Robert MaynardNote Added: 0039724
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038167)
Mark Stijnman   
2015-03-06 12:31   
Actually, I just found out there is another issue with the file names for the .wixobj files: they are not absolute paths. As a consequence, they end up in the project main binary output directory. I have more than one package in my project, and my build just failed when it tried to build them concurrently, because directories.wixobj was locked. I suggest the .wixobj files are written to the same directory as the directory.wxs etc files are written.
(0038185)
Nils Gladitz   
2015-03-09 09:59   
Thank you for the report.

Those issues should be fixed by http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=2e16aff1 [^]
(0039724)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.