[CMake] Source Group Problem
Andrew Maclean
a.maclean at cas.edu.au
Wed Oct 5 05:38:28 EDT 2005
This code fragment seems to work OK:
#---------------------------------------------------------------------------
--
# Source Groups.
#---------------------------------------------------------------------------
--
SET( SOURCE_GROUP_NAME "GPSLib" )
SET( SOURCE_GROUP_NAME_INC "${SOURCE_GROUP_NAME}/Includes" )
SET( SOURCE_GROUP_NAME_SRC "${SOURCE_GROUP_NAME}/Sources" )
IF ( WIN32 )
STRING( REGEX REPLACE "/" "\\\\" SOURCE_GROUP_NAME_INC
${SOURCE_GROUP_NAME_INC} )
STRING( REGEX REPLACE "/" "\\\\" SOURCE_GROUP_NAME_SRC
${SOURCE_GROUP_NAME_SRC} )
ENDIF ( WIN32 )
SOURCE_GROUP ( ${SOURCE_GROUP_NAME_INC} FILES ${GPS_INCS} )
SOURCE_GROUP ( ${SOURCE_GROUP_NAME} FILES ${GPS_SRCS} )
We get in the Visual Studio solution explorer GPsLib full of .cpp files and
a subdirectory Include full of *.h files.
If I substitute SOURCE_GROUP_NAME_SRC for SOURCE_GROUP_NAME in the last line
above, I expect to get an empty GPSLib directory and two subdirectories
Source and Include. However GPSLib is not created at all in this case. It
seems that CMake will not create an empty directory in this case. Even
though the subdirectories are not empty. I can do thin manually in Visual
Studio so I don't think it is a Visual Studio issue.
Is this behaviour intentional? If so is there a workaround?
I am using the latest CMake from the CVS and Visual Studio 7.1.
Regards
Andrew
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.cas.edu.au/
___________________________________________
More information about the CMake
mailing list