> Any ideas as to how to get cmake to generate (or find) an appropriate main 
> GUID ?  (Note that the second GUID "AE....48B" is correct and presumably read 
> from the target project file.)

Having had  a quick delve into the source code, it looks like this is 
hard-coded (probably in cmGlobalVisualStudio7Generator::WriteProject though I'm 
away from my dev machine and can't check).  Will take a look at creating a 
patch next week.

Neil


From: [email protected] [mailto:[email protected]] On Behalf Of 
Neil MacMullen
Sent: 08 April 2011 17:23
To: [email protected]
Subject: Re: [CMake] Visual Studio 10 with external project dependencies - 
error MSB4192

Ok, a little more progress... . The generated solution contains a reference to 
the external project of the form.:

Project("{8AE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EthernetBus", 
"C:\work\software\main\Neul\libraries\EthernetBus\EthernetBus.csproj", 
"{AE1392AF-506E-4648-A389-FBCCBB29D48B}"
EndProject

The (first) problem is with the 'main' GUID 
(8AE04EC0-301F-11D3-BF4B-00C04F79EFBC).  If I manually edit this GUID to the 
one from the reference solution (created directly by visual studio), the 
cmake-generated solution will now build.  (Or at least, I can move on to the 
next problem which is that ProjectConfigurationPlatforms need tweaking to "Any 
CPU").

Any ideas as to how to get cmake to generate (or find) an appropriate main GUID 
?  (Note that the second GUID "AE....48B" is correct and presumably read from 
the target project file.)

I probably should have mentioned before that I'm setting the dependency like 
this inside the cmakelist.txt file so no particular 'magic'...

                include_external_msproject(${PROJ_NAME} "${PPATH}")
                add_dependencies(basestation ${PROJ_NAME})

  Thanks,
      Neil


From: [email protected] [mailto:[email protected]] On Behalf Of 
Neil MacMullen
Sent: 08 April 2011 16:44
To: [email protected]
Subject: [CMake] Visual Studio 10 with external project dependencies - error 
MSB4192

I've now made considerable progress with creating a cmake configuration for a 
managed (CLR) project which also links to external managed dlls.  I can use 
msbuild  on ALL_BUILD.vcxproj  to successfully create an executable etc.

Only one minor issue remains; I'd like to open the cmake-generated solution 
file in visual studio to allow debugging and browsing of the solution 
(including external project dependencies).  Unfortunately, something in the 
solution file is convincing  visual studio that it has been generated by an 
obsolete version and needs to be 'converted'.   If I use msbuild on the 
solution file I get the following error which is a strong clue....

C:\work\software\main\Neul\products\basestation\builds\Emulation>msbuild 
Basestation.sln
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.225]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 08/04/2011 16:22:52.
C:\work\software\main\Neul\products\basestation\builds\Emulation\Basestation.sln
 : error MSB4192: The project file 
"..\..\..\..\libraries\EthernetBus\EthernetBus.csproj" is in the ".vcproj" file 
format, which MSBuild no longer supports. Please convert the project by opening 
it in the Visual Studio IDE or running the conversion tool, or use MSBuild 3.5 
or earlier to build it.

Build FAILED.


Now, it's most certainly the case that EthernetBus.csproj is NOT in the 
'vcproj' format which I can easily verify by going and building it directly.  
However, something about the layout of the solution file is confusing visual 
studio.  Inspecting it by eye and comparing to a working solution which also 
includes EthernetBus.csproj doesn't reveal any 'obvious' problems; the GUID has 
been correctly inserted in the solution etc.  The section

                GlobalSection(ProjectConfigurationPlatforms) = postSolution

Contains win32 rather than "Any CPU" targets but even replacing these by hand 
isn't enough to remove the msbuild error.

Anybody managed to work around this ?

Note, the project/solution was generated using the "Visual Studio 10" generator.

  Thanks,
           Neil
________________________________

No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 10.0.1209 / Virus Database: 1500/3558 - Release Date: 04/07/11

________________________________

No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 10.0.1209 / Virus Database: 1500/3558 - Release Date: 04/07/11
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to