[CMake] set_source_files_properties for includedirectories

Andrea Galeazzi Galeazzi at korg.it
Tue Nov 23 09:23:49 EST 2010


Marcel Loose ha scritto:
>>>> On 23-11-2010 at 10:55, in message <4CEB8F76.80300 at korg.it>, Andrea
>>>>         
> Galeazzi
> <galeazzi at korg.it> wrote: 
>   
>> In a project I've got two groups of files having different include 
>> paths. These paths have some conflicts so I need to specify just one 
>>     
>
>   
>> for each file requires it.
>> My first idea was to apply set_source_files_properties with a
>>     
> property 
>   
>> like include_directories but I don't find anything similar. My next 
>> attempt is gonna use the COMPILE_FLAGS property, does anybody know a
>>     
>
>   
>> more efficient and elegant way to accomplish a such task?
>> An equivalent issue was discussed in this thread 
>> http://www.mail-archive.com/cmake@cmake.org/msg05276.html but I
>>     
> didn't 
>   
>> find any useful answer.
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: 
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>     
>
> Hi Andrea,
>
> As you noted include_directories is a per-directory setting. So, if
> you're free to reorganize your source files, you could put the two
> groups of files in two different directories. Then you can use
> include_directories() in each directory. Make sure you don't make one of
> these directories a subdirectory of the other.
>
> HTH,
> Marcel Loose.
>
>
> __________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 5639 (20101122) __________
>
> Il messaggio è stato controllato da ESET NOD32 Antivirus.
>
> www.nod32.it
>
>
>
>
>   
Yes, the sources are splitted in different directories but the 
CMakeLists.txt is just one:
-Root
  CMakeLists.txt
  -dir1
        file1.cpp
        file2.cpp
        ......
  -dir2
         file1.cpp
         file2.cpp
         .........
I'd like to generate just one IDE project from this project.


More information about the CMake mailing list