<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//DE"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><TITLE>Message</TITLE></HEAD><BODY>Hi,
I've tried to include assembler-files in one of my projects and with the masm-rule I have included the sourcefiles like normal c++-files in my library and enabled masm-support. But when I generate the visual studio 2010 solution the files are included without a custom command to compile the file or something else.
When I understand it right, the files can be included without a custom tool, but you need in the vcproj-file the following:
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
(taken from here: http://blogs.msdn.com/b/vcblog/archive/2010/04/21/quick-help-on-vs2010-custom-build-rule.aspx )
but to make visual studio compile it with masm the "<ClInclude Include="path/to/file" />" has to be
"<MASM Include="path/to/file"><FileType>Document</FileType></MASM>"
I've already patched the extensionsettings and -targets in cmVisualStudio10TargetGenerator.cxx, but I don't know how to patch the sources for the second needed change(ClInclude to MASM). Could anybody help here?
And is this the prefered solution to include assembler-files into cmake? (this patch only works with vs2010, what's with the other versions or ides...)
As a sidenote: I've tried to include the obj-file in the normal file-list like:
ADD_LIBRARY(foo
bar1.cpp
bar2.cpp
asmcode.obj
)
but the generated visual-studio-2010-project contained an error (the asmcode.obj is now listed two times and can't be loaded from visual studio)
regards
kai
</BODY></HTML>