[CMake] Using absolute values in include_directories directive
John Drescher
drescherjm at gmail.com
Wed Mar 3 14:13:58 EST 2010
On Wed, Mar 3, 2010 at 1:44 PM, Felipe Sodre dos Santos
<felipe.sodre at 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
More information about the CMake
mailing list