You can do this at configure-time, by doing
include_directories($ENV{WHATEVERDIR})

although that's generally discouraged - use a find module instead to set SOMEPACKAGE_INCLUDE_DIRS that you can use like:
include_directories(${SOMEPACKAGE_INCLUDE_DIRS})

For the case of QT, see my recent email to the list showing a clean CMake file for building a QT app.

Ryan

On 03/03/2010 12:44 PM, Felipe Sodre dos Santos wrote:

Hello all.

Im trying to set an include directory which is actually an environment variable inside VC++ , $(QTDIR), and thus I tried the following:

...

include_directories(

  $(QTDIR)/include

)

...

It comes up that in the resulting SLN file, it translates that directive to C:/basedir/$(QTDIR)/include, where basedir is the root directory for the project. However, that wouldn't work since $(QTDIR) is something like "C:\Qt".

Is there a way to make CMake to not put "C:/basedir/" before $(QTDIR) ?

Thanks in advance

Felipe


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to