[CMake] include_external_msproject

Lars laasunde at hotmail.com
Tue Jan 26 09:43:58 EST 2016


Appreciate some help understanding include_external_msproject.
Using Windows 7 and cmake 3.3  
 
This is what has been done so far,
 
1. Opened Visual Studio 2012 and created a new project (Windows Forms Application) and saved it under c:\temp\test.
 
2. Used the following to an cmake;
include_external_msproject(ext_test c:/test/test/test.sln)
 
This generates an error MSB4126: The specified solution configuration "Debug|x86" is invalid. Please specify a valid solution configuration using the configuration and platform properties...
 
3. So update the cmake file (below), clear build folder and build again;
include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "Any CPU")
 
This generate the exact same error message as above. So the PLATFORM keyword does not appear to be used in this context. Anyone care to explain how PLATFORM works and howto specify correct configuration and platform?
 
4. To workaround the problem we open the visual studio project and added the configuration and platform combo "Debug" and "x86" which cmake appears to require. We use the original cmake script (below), clear build folder and build again.
include_external_msproject(ext_test c:/test/test/test.sln)
 
The following error is produced;
c:\temp\test\test\test.sln.metaproj : error MSB4057: The target "GetNativeManifest" does not exists in the project.
 
Searched all files in source and build directory and cannot find any reference to "GetNativeManifest". See some issue online in regards to build order but cannot see how that applies to this simple example. Really do not understand this issue. Any ideas?
 
6. Update cmake and use .csproj instead of the solution file and it works. The test.exe file is build. The cmake looks like this
include_external_msproject(ext_test c:/test/test/test.csproj)
 
Does include_external_msproject support solution files?
 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160126/4121301c/attachment.html>


More information about the CMake mailing list