Re: [CMake] Splitting directory and file.

2011-03-04 Thread Pablo Zurita
Yeah I was aware of that, I forgot to state that on the comment for the function. This was made on purpose since I don't want the pain of adding every file to CMake and I certainly don't want CMake running automatically. Thanks, Pablo Zurita. PS: the sourceFiles argument must be removed from

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Pablo Zurita
Yes, that works. Now I just need to remove the last character if it is a forward slash. How can I do that? Thanks, Pablo Zurita. Sent from my iPhone On Mar 2, 2011, at 1:47 AM, Yuri Timenkov y...@timenkov.ru wrote: Does get_filename_component help? On Wed, Mar 2, 2011 at 6:17 AM, Pablo

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Michael Wild
string(REGEX REPLACE /+$ dname ${dname}) Strips all trailing slashes. But honestly, man cmake would have been way faster and less embarrassing... HTH Michael On 03/02/2011 01:41 PM, Pablo Zurita wrote: Yes, that works. Now I just need to remove the last character if it is a forward slash.

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Pablo Zurita
Thanks for the help guys. With that I was able to write the following function that allows me to deal with my source as I want. # create_source_group(relativeSourcePath sourceGroupName files) # # Creates a source group with the specified name relative to the relative path

Re: [CMake] Splitting directory and file.

2011-03-02 Thread Michael Wild
On 03/03/2011 05:00 AM, Pablo Zurita wrote: Thanks for the help guys. With that I was able to write the following function that allows me to deal with my source as I want. # create_source_group(relativeSourcePath sourceGroupName files) # # Creates a source group with the

[CMake] Splitting directory and file.

2011-03-01 Thread Pablo Zurita
Hello everybody, I'm just getting started and I need some help dealing with strings in CMake. Basically what I have a bunch of strings such as the ones below: Main.cpp Window/Example/Example.cpp Window/Window.cpp What I need to do is create two strings for each, one is going to be the

Re: [CMake] Splitting directory and file.

2011-03-01 Thread Yuri Timenkov
Does get_filename_component help? On Wed, Mar 2, 2011 at 6:17 AM, Pablo Zurita pzur...@gmail.com wrote: Hello everybody, I'm just getting started and I need some help dealing with strings in CMake. Basically what I have a bunch of strings such as the ones below: Main.cpp