[CMake] how to specify path of header files at run time through cmake

James Bigler jamesbigler at gmail.com
Fri Jan 30 11:11:03 EST 2009


What do you mean %h?  Is this a literal character in your file?  If so, then
at least I've never heard of it.

You specify paths to header files using the include_directories command:

$ cmake --help-command include_directories
cmake version 2.6-patch 1
------------------------------------------------------------------------------
SingleItem

  include_directories
       Add include directories to the build.

         include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)

       Add the given directories to those searched by the compiler for
       include files.  By default the directories are appended onto the
       current list of directories.  This default behavior can be changed by
       setting CMAKE_include_directories_BEFORE to ON.  By using BEFORE or
       AFTER you can select between appending and prepending, independent
       from the default.  If the SYSTEM option is given the compiler will be
       told that the directories are meant as system include directories on
       some platforms.

James

On Fri, Jan 30, 2009 at 6:24 AM, ankit jain <ankitguddu at gmail.com> wrote:

> hi all,
>
> How can we specify the path of header fiels at run time through cmake since
> i have a line in my C file as #include "%h"
>
>
> Regards-
> ankit jain
>
> _______________________________________________
> 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/20090130/6a49d33a/attachment.htm>


More information about the CMake mailing list