[CMake] Add configuration support to include_directories()

Robert Dailey rcdailey at gmail.com
Sun Dec 21 22:45:10 EST 2008


Will this work in Visual Studio? How does CMake know to place the
appropriate include directories in the appropriate configuration?

I also was not able to find CMAKE_BUILD_STATUS in the 2.6 documentation.
Where can I read about this variable?

On Sun, Dec 21, 2008 at 1:49 PM, Andrey Sploshnov <
ice.nightcrawler at gmail.com> wrote:

> May be you need something like this?
>
> include_directories (C:\includes\foo\all)
>
> if (CMAKE_BUILD_STATUS STREQUAL "Debug")
>
>   include_directories (C:\includes\foo\debug)
>
> elseif (CMAKE_BUILD_STATUS STREQUAL "Release")
>
>   include_directories (C:\includes\foo\release)
>
> endif (CMAKE_BUILD_STATUS STREQUAL "Debug")
>
> On Thu, Dec 18, 2008 at 11:13 PM, Robert Dailey <rcdailey at gmail.com>wrote:
>
>> Would it be possible to add configuration support to
>> include_directories()? For example, some include directories I only want to
>> show up in debug, some in release, and some in all configurations. I imagine
>> this would look a lot like target_link_libraries():
>>
>> include_directories(
>>     C:\includes\foo\all # This include path applies to all configurations
>>     debug C:\includes\foo\debug # This include path only shows up in debug
>> configurations
>>     release C:\includes\foo\release # This include path only shows up in
>> release configurations
>> )
>>
>> _______________________________________________
>> CMake mailing list
>> CMake at cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
>
> --
> No fate, but what we make!
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081221/e43e0c55/attachment.htm>


More information about the CMake mailing list