<div dir="ltr">I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04.<div><br></div><div>I am running the following command [4] for ccmake: </div><div><pre style="padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);background-color:rgb(249,249,249);line-height:1.1em">cd /path/to/VTK-Release-build
ccmake -DVTK_QT_VERSION:STRING=5 \
-DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \
-DVTK_Group_Qt:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake \
-DBUILD_SHARED_LIBS:BOOL=ON
/path/to/VTK</pre><div><br></div>but I'm getting the following error:</div><div><i><br></i></div><div><i>(ADD_CUSTOM_COMMAND):</i><br></div><div><div><i>Policy CMP0040 is not set: The target in the TARGET signature of</i></div><div><i>add_custom_command() must exist. Run "cmake --help-policy CMP0040" for </i><i>policy details. Use the cmake_policy command to set the policy and</i></div><div><i>suppress this warning.</i></div><div><i><br></i></div><div><i>The target name</i><br></div><div><i>"/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h"</i><br></div><div><i>is unknown in this context.</i></div><div><i>This warning is for project developers. Use -Wno-dev to suppress it.</i></div><div><br></div>Would you please hint me how to tackle this error?</div><div><br></div><div>Thanks</div><div>-S<br><br>[1] <a href="http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz">http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz</a><br>[2] <a href="http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run">http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run</a><br>[3] <a href="http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz">http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz</a><br></div><div>[4] <a href="http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5">http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5</a></div><div><br></div><div><br></div></div>