[CMake] Adding Generated Header to VS Project

Brandon Van Every bvanevery at gmail.com
Tue Jun 19 17:31:23 EDT 2007


On 6/19/07, Mike Jackson <imikejackson at gmail.com> wrote:
> I have the following as part of my CMakeLists.txt file:
>
> CONFIGURE_FILE(${MXADataModel_SOURCE_DIR}/src/Headers/MXAConfiguration.h.in
>                ${PROJECT_BINARY_DIR}/MXAConfiguration.h @ONLY IMMEDIATE)
> INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
>
> And in a source file I then have:
>
> #include <MXAConfiguration.h>
>
> And when VS2003,Net tries to compile I get a warning that
> MXAConfiguration.h: No such file or directory. I have verified that
> the file gets generated and is in the proper location. I looked at the
> project properties in VS and my build directory is in fact NOT part of
> the include paths. What gives? This works fine on OS X/Linux? Is there
> something special I need to do for Windows?

Why do you have quotes around ${PROJECT_BINARY_DIR} ?  You don't need
them.  Maybe that's it.

Cheers,
Brandon Van Every


More information about the CMake mailing list