[CMake] INCLUDE_DIRECTORIES and relative path

Bill Hoffman bill.hoffman at kitware.com
Tue Nov 3 12:23:25 EST 2009


jago jagoc wrote:
> Hi Bill,
> Sorry if i reply the issues but it's strange that the
> INCLUDE_DIRECTORIES add the project dir to all its parameter.
> Is there a way to include some dir with  INCLUDE_DIRECTORIES macro
> without the project directory before?
> I would like to add only a relative path ..\..\include to my  Visual
> studio solution c++ properties( by cmakelist.txt) i don't want the
> absolute path c:\myprojectdir\include. Is it possible?
> 
> Any suggestion?
> 

No, CMake is not good at relative paths.  I suspect that you are trying 
to use them so that you can generate a project and then give it to 
someone, CMake does not really do that.  You have to run CMake on the 
machine that does the build.

-Bill


More information about the CMake mailing list