[CMake] Adding Generated Header to VS Project
Mike Jackson
imikejackson at gmail.com
Tue Jun 19 18:37:49 EDT 2007
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}") does the trick.
Sorry for not getting back to the list sooner. Problem solved.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Jun 19, 2007, at 6:25 PM, Jack Kelly wrote:
> 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
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list