Preamble: I'm trying to integrate my C # csproj with the rest of Cake and the C ++ / CLI code base. I received a recommendation against trying to do this because CMake does not interact well with .NET in Visual Studio, but after implementing some of the settings, I feel like I'm very close.
Part of my setup uses the configure_file command to edit the csproj file during CMake to customize it depending on the type of build (e.g. x86, x64) that happens.
The problem is that I am using ProjectReference tags to reference C ++ / CLI projects:
<ProjectReference Include="..\..\WrapperProject\WrapperProject.vcproj"> <Project>{7BD6E175-CDD1-4F8D-A3B2-0AC862E62C03}</Project> <Name>WrapperProject</Name> </ProjectReference>
... and the GUIDs cannot remain static, as they change for the project whenever the CMake cache is rebuilt (correct me if I am wrong).
So, what I would like to do is find in CMake time what GUIDs are planned for these projects and edit the vcproj file accordingly.
Google tells me that people can use 'set_property' to set the GUID, for example:
set_property(CACHE ${target_name}_GUID_CMAKE PROPERTY VALUE ${MY_GUID} )
... but I cannot find the getter equivalent. I tried things like this:
get_property (WRAPPER_GUID CACHE INTERNAL PROPERTY WrapperTargetName_GUID_CMAKE)
... no luck. Your help is appreciated!
source share