[CMake] Add configuration support to include_directories()

Robert Dailey rcdailey at gmail.com
Tue Dec 23 21:01:21 EST 2008


On Tue, Dec 23, 2008 at 2:40 PM, Michael Jackson <
mike.jackson at bluequartz.net> wrote:

>
>
> On Dec 23, 2008, at 1:05 PM, Robert Dailey wrote:
>
>  Mike Jackson wrote
>>>
>>
>  I am just thinking out loud here so if I am totally off the mark just
>>> ignore.
>>>
>>> So the problem is including /foo/bar-d or /foo/bar for debug and release.
>>>
>>> For a release build there is the -NDEBUG definition and for Debug there
>>> is the -DEBUG compiler definitions defined (or something that at effect)
>>>
>>> In your own project have a header file (MySetup.h) with something like:
>>>
>>> #ifdef NDEBUG
>>>  #include "bar/setup.h"
>>> #else
>>>  #include "bar-d/setup.h"
>>> #endif
>>>
>>> Then you need to just have C:\foo on the include path.
>>>
>>> I _think_ something like that might work. Not sure how scalable or
>>> maintainable that might be since I have never used wxWidgets.
>>>
>>
>> This is a great idea but I can't do this, since I would have to edit
>> wxWidgets source files to make this work. For my own specific case I do not
>> want to edit third party libraries. However, again, this is a very valid
>> work around and would be usable in the typical case.
>>
>
> Um.. why would you need to modify the wxWidgets source?


Because wxWidgets is the library including the setup.h file. It expects you
to setup the include directories so it can find it, that's all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081223/cb569652/attachment.htm>


More information about the CMake mailing list