Hi John, thanks for answering.

I'm actually porting a project from VC++ to be built using CMake tools, and 
thus I'm first "translating" the VCPROJ files into CMakeLists.txt files. I'll 
try what you said, but I still would like to know if there's a way to do what I 
was trying to do.

Thanks !

-----Original Message-----
From: John Drescher [mailto:dresche...@gmail.com] 
Sent: quarta-feira, 3 de março de 2010 16:14
To: Felipe Sodre dos Santos
Cc: cmake@cmake.org
Subject: Re: [CMake] Using absolute values in include_directories directive

On Wed, Mar 3, 2010 at 1:44 PM, Felipe Sodre dos Santos
<felipe.so...@totvs.com.br> 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".
>
>

If you need this only for Qt. Why don't you use the proper Qt support in CMake?

FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})

# Use the include path and library for Qt that is used by VTK.
INCLUDE_DIRECTORIES(
  ${QT_INCLUDE_DIR}
 )

John
_______________________________________________
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