[CMake] How to insert environment variable in INCLUDE_DIRECTORIES

Peterson, Isaac F. isaac.f.peterson at ngc.com
Tue Apr 21 21:08:34 EDT 2009


I'm using Cmake 2.6 to generate Visual Studio 7 .NET 2003 projects.  Due
to a Windows limitation of 200 characters per directory path, I need to
put an environment variable into the project settings include path.

I'd like to do the following

INCLUDE_DIRECTORIES(
   include
   some_local_folder/include
   $(MY_PATH)/some_library/include
)

Which would generate the following includes in VS:

..\include
..\some_local_folder\include
$(MY_PATH)\some_library\include

I don't want Cmake to expand MY_VAR, or to prepend it will the ..\  I
tried using the SYSTEM parameter, but that didn't change anything.  I
also tried reading and searching the documentation as well, but couldn't
find much about the INCLUDE_DIRECTORIES function.

Many Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090421/845b5685/attachment.htm>


More information about the CMake mailing list