<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm a new user. I want to use cmake for our 
cross-platform software.</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm trying to generate a vcproj project with 
sub&nbsp;source groups&nbsp;but it seems to be impossible with the current 
version of cmake. </FONT></DIV>
<DIV><FONT face=Arial size=2>I coded this, but I can't have sub source groups 
with it : </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT color=#ffffff size=2>
<DIV><FONT face="Courier New" color=#000080># 
-------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># Global description for the source 
files</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>#</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># Note : The source file with no 
folder must be put at the top of the list</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># 
-------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Courier New" 
color=#000080>SET(VKKERNEL_GLOBALS_SOURCES_DESC</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; "Clock 
Management"</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkClock.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkClockManager.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkSystemTimeSource.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkTimeSource.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkClock.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkClockManager.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkSystemTimeSource.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkTimeSource.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
"Containers"</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkArray.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkBinaryTree.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkDictionary.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkHash.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkList.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkLockFreeQueue.h </FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>)</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080># 
-------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># This loop will :</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># - add the source files to the 
source list</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># - sort every source file into its 
project folder (works only for .vcproj projects)</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080># 
-------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>FOREACH (SOURCE_DESCRIPTION 
${VKKERNEL_GLOBALS_SOURCES_DESC})</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; IF 
(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; # this is a source file</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; #add it to the source list</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; SET (VKKERNEL_SOURCES ${VKKERNEL_SOURCES} 
${SOURCE_DESCRIPTION})</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; # add it to the current folder list</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; IF (NOT CUR_FOLDER_LIST)</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # this the first item in the folder list, 
so no "|" at the start</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET (CUR_FOLDER_LIST 
${SOURCE_DESCRIPTION}) </FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; ELSE (NOT CUR_FOLDER_LIST) </FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET (CUR_FOLDER_LIST 
${CUR_FOLDER_LIST}|${SOURCE_DESCRIPTION}) </FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; ENDIF (NOT CUR_FOLDER_LIST)</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; ELSE 
(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; # this is a source folder</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; # create the source folder</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; IF (CURRENT_FOLDER)</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # this is the first time we meet a source 
folder</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SOURCE_GROUP("${CURRENT_FOLDER}" 
"${CUR_FOLDER_LIST}")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET (CUR_FOLDER_LIST "")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; ENDIF (CURRENT_FOLDER)</FONT></DIV>
<DIV><FONT face="Courier New" 
color=#000080>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET 
(CURRENT_FOLDER ${SOURCE_DESCRIPTION})</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
ENDIF(${SOURCE_DESCRIPTION} MATCHES "[A-Za-z]*.(h|cpp)$")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>ENDFOREACH(SOURCE_DESCRIPTION 
${VKKERNEL_GLOBALS_SOURCES_DESC})</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080># create the last source 
folder</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>SOURCE_GROUP("${CURRENT_FOLDER}" 
"${CUR_FOLDER_LIST}")</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>ADD_LIBRARY(vkKernel SHARED 
${VKKERNEL_SOURCES})</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000>
<DIV><FONT face=Arial size=2>I looked to the sources of cmake and I found 
that&nbsp;SourceGroup can have children group but it seems to be not 
used.&nbsp;Did I miss something ?</FONT></DIV>
<DIV>If there is no sub source group support in cmake currently, I plan&nbsp;to 
add it myself with this syntax in the config :</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face="Courier New" 
color=#000080>SET(VKKERNEL_GLOBALS_SOURCES_DESC</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; "Source 
Files::Clock Management"</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkClock.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkClockManager.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkSystemTimeSource.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkTimeSource.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkClock.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkClockManager.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkSystemTimeSource.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; source/vkTimeSource.cpp</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; "Source 
Files::Containers"</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkArray.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkBinaryTree.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkDictionary.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkHash.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkList.h</FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; vkLockFreeQueue.h </FONT></DIV>
<DIV><FONT face="Courier New" color=#000080>)</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any help will be 
much&nbsp;appreciated.</FONT></DIV>
<DIV>Thank you.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Sylvain Benner</DIV></FONT></DIV></FONT></BODY></HTML>