[CMake] Visual Studio project groups not working after conversion

Klaim - Joël Lamotte mjklaim at gmail.com
Mon Apr 30 06:12:14 EDT 2012


Hi,

I used the following code to add protobuf project to my "solution":

$-------------- script ----------------------$

if( MSVC )
include_external_msproject( libprotobuf
${CMAKE_CURRENT_SOURCE_DIR}/protobuf/vsprojects/libprotobuf.vcproj )
else()
message( "No project file set for protobuf for this platform!" )
endif()

set( PROTOBUF_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/protobuf/src
PARENT_SCOPE )

set_property( TARGET libprotobuf PROPERTY FOLDER
${NETRUSH_DEPENDENCIES_PROJECTS_GROUP_PATH}/protobuf )



$-------------- end script ----------------------$

This works.
The problem I have is with the virtual directories that cannot work
correctly: the protobuf project file is for VS2008 while I'm using VS2010.
This makes visual studio try to convert the project, and succeed.
But the project isn't located in the right solution virtual directory that
I set in the last line of this script (it works with all other projects).

So I think that the conversion do something that makes the solution
generated by CMake not point to the right project because it is different
once the project have been converted.

I don't know if it can be fixed on your side but "now you know". :)

Joël Lamotte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120430/024bced9/attachment.htm>


More information about the CMake mailing list