2014-04-10 43 views
0

由於幾天我一直在掙扎最新小牛安裝VTK的。 我已經嘗試不同類型的安裝,但我得到了一個錯誤:在MAC安裝VTK(CMake的政策CMP0022未設置)

CMake Warning (dev) in Common/Core/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 "vtkCommonCore" has an INTERFACE_LINK_LIBRARIES property which 
    differs from its LINK_INTERFACE_LIBRARIES properties. 

    INTERFACE_LINK_LIBRARIES: 

vtksys 

    LINK_INTERFACE_LIBRARIES: 



This warning is for project developers. Use -Wno-dev to suppress it. 

我試圖制定政策中的CMakeLists.txt文件

if(POLICY CMP0020) 
    cmake_policy(SET CMP0020 NEW) 
endif() 

,但我得到一個錯誤

CMake Error in Common/Core/CMakeLists.txt: 
    Target "vtkCommonCore" has policy CMP0022 enabled, but also has old-style 
LINK_INTERFACE_LIBRARIES properties populated, but it was exported without 
    the EXPORT_LINK_INTERFACE_LIBRARIES to export the old-style properties 



CMake Error in IO/NetCDF/CMakeLists.txt: 
    Target "vtkIONetCDF" has policy CMP0022 enabled, but also has old-style 
    LINK_INTERFACE_LIBRARIES properties populated, but it was exported without 
    the EXPORT_LINK_INTERFACE_LIBRARIES to export the old-style properties 

請幫幫我。 VTK我逼瘋了

回答

0

1)這是一個警告,而不是錯誤。

2)當您設置策略時,您設置了錯誤的策略。

+0

它可能只是一個警告,但我試圖編譯示例,這是不可能的,因爲系統看不到安裝的vtk。 –

+0

在這種情況下,你沒有描述你遇到的問題。 – steveire