[CMake] Adding Generated Header to VS Project

Jack Kelly endgame.dos at gmail.com
Tue Jun 19 18:25:46 EDT 2007


Brandon Van Every wrote:
 > 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 say ${PROJECT_BINARY_DIR}? I thought you had to call it by 
the name you specify in PROJECT(), i.e., ${MXADataModel_BINARY_DIR}.

(@Brandon: Sorry for mailing off-list, you'll see this twice.)

-- Jack




More information about the CMake mailing list