C ++ / CLI y CMake

Estoy intentando configurar un proyecto de C ++ / CLI usando cmake. He tenido éxito haciendo esto con Visual Studio 2010, pero ahora estoy trabajando con una solución heredada que requiere Visual Studio 2008. En Visual Studio 2010, es suficiente para configurar mi CMake de esta manera:

set_target_properties(${PROJECT_NAME} PROPERTIES VS_DOTNET_REFERENCES "${CMAKE_CURRENT_SOURCE_DIR}/../OrionMaster/3rdParty/GMap.NET.Core.dll;System;System.Core;System.Data;System.Drawing;System.Xml;WindowsBase")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/clr /EHa")
set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "d")

if(CMAKE_CXX_FLAGS_DEBUG MATCHES "/RTC1")
   string(REPLACE "/RTC1" " " CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
endif()

if(CMAKE_CXX_FLAGS MATCHES "/EHsc")
   string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()

Cuando luego examino el proyecto en Visual Studio 2010, puedo ver todas las referencias y el "Soporte de Common Language Runtime Support" está activado. Cuando lo intento en Visual Studio 2008, no veo ninguna referencia, y el proyecto está configurado como "No hay soporte de Common Language Runtime". Si luego veo las opciones del compilador, puedo ver que / clr se pasa al compilador. . Sin embargo, todavía recibo muchos errores de compilación, probablemente porque carece de referencias. ¿Alguien sabe una manera de configurar esto correctamente?

Respuestas a la pregunta(2)

Su respuesta a la pregunta