[vtkusers] Building VTK+QT with Visual Studio 2010 C++ in Win7

David Gobbi david.gobbi at gmail.com
Wed Mar 26 02:10:28 EDT 2014


Hi Rodrigo,

It's because you are using a new version of CMake.  The warning message
gives you some hints:

  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface. Run "cmake --help-policy CMP0022" for policy details. Use the
  cmake_policy command to set the policy and suppress this warning.

Did you run "cmake --help-policy CMP0022" to see what it says about the
warning?

A simple fix is to use an older version of cmake, e.g. this one:
http://www.cmake.org/files/v2.8/cmake-2.8.11-win32-x86.exe

  David



On Tue, Mar 25, 2014 at 11:49 PM, Rodrigo Lovera
<lobo.theslayer at gmail.com> wrote:
> Hello everyone,
>
>
> I'm trying to get back on my thesis work using VTK and QT on C++ visual
> studio environment, on my old pc didn't have issues while building vtk
> library with qt use but now im getting the following error msg at cmake.
> Hope someone can help me get rid of it. Thanks in advance.
>
> I was building VTK 5.10.1 with QT 4.8.2 and using Cmake 2.8.12
>
> The error in cmake goes as follows:
>
> CMake Warning (dev) in Common/CMakeLists.txt:
> Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
> interface. Run "cmake --help-policy CMP0022" for policy details. Use the
> cmake_policy command to set the policy and suppress this warning.
>
> Target "vtkCommon" has an INTERFACE_LINK_LIBRARIES property. This should
> be preferred as the source of the link interface for this library but
> because CMP0022 is not set CMake is ignoring the property and using the
> link implementation as the link interface instead.
>
> INTERFACE_LINK_LIBRARIES:
>
> vtksys;wsock32;vtksys
>
> Link implementation:
>
> vtksys;wsock32
>
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> CMake Warning (dev) in Filtering/CMakeLists.txt:
> Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
> interface. Run "cmake --help-policy CMP0022" for policy details. Use the
> cmake_policy command to set the policy and suppress this warning.
> --
> Rodrigo aka WarHearT


More information about the vtkusers mailing list