[vtkusers] Problem depending on VTK >= 8.1 with CMake 3.12.1 and VTK 8.1.1 on Win 10/MSVC 2017
Elvis Stansvik
elvis.stansvik at orexplore.com
Sun Aug 19 04:33:50 EDT 2018
2018-08-19 10:24 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> Forgot to mention, this is with MSVC 2017.
>
> Also for reference, it works on our regular Windows build worker, which has:
>
> - Windows 8.1
> - MSVC 2015
> - CMake 3.7.2
> - VTK 8.1.1
>
> Everything is built the same way there, this is why I suspect some
> behavioral change in CMake could be the cause.
>
> Our find_package invocation for VTK is:
>
> find_package(VTK 8.1 REQUIRED
> COMPONENTS
> vtkChartsCore
> vtkCommonCore
> vtkCommonDataModel
> vtkCommonExecutionModel
> vtkFiltersSources
> vtkGUISupportQt
> vtkImagingCore
> vtkImagingStatistics
> vtkInteractionStyle
> vtkRenderingAnnotation
> vtkRenderingContext2D
> vtkRenderingContextOpenGL2
> vtkRenderingCore
> vtkRenderingFreeType
> vtkRenderingOpenGL2
> vtkRenderingQt
> vtkRenderingVolume
> vtkRenderingVolumeOpenGL2
> vtkViewsContext2D
> )
>
> VTK was built with:
>
> cd \Users\Elvis\Dev\VTK-8.1.1
> mkdir build
> cd build
> cmake ^
> -DCMAKE_INSTALL_PREFIX=C:/Users/Elvis/Dev/VTK-8.1.1-inst ^
> -DVTK_Group_Qt=ON ^
> -DVTK_QT_VERSION=5 ^
> -DQt5_DIR=C:/Users/Elvis/Dev/Qt/Qt5.11.1/5.11.1/msvc2017_64/lib/cmake/Qt5 ^
> -DVTK_Group_Imaging=ON ^
> -DVTK_Group_Views=ON ^
> -DVTK_Group_MPI=OFF ^
> -DVTK_Group_Tk=OFF ^
> -DVTK_Group_Web=OFF ^
> -DVTK_Group_StandAlone=OFF ^
> -DBUILD_TESTING=OFF ^
> -DVTK_USE_SYSTEM_LIBRARIES=OFF ^
> -DCMAKE_BUILD_TYPE=Release ^
> -DCMAKE_MAKE_PROGRAM=C:/Users/Elvis/Dev/ninja-win/ninja.exe ^
> -GNinja ^
> .. > cmake.out 2>&1
> cmake --build . --config "Release" > build.out 2>&1
> cmake --build . --target install > install.out 2>&1
>
> Or could the error I'm getting in fact not be about a version
> mismatch, but some missing VTK module? (very cryptic if so).
I've now eliminated that possibility by testing with a reduced list of
COMPONENTS containing just vtkCommonCore.
So it must be something in the version matching that goes wrong :(
Elvis
>
> I'm attaching the output from the configuration of VTK on the
> problematic machine (see cmake.out).
>
> Elvis
>
> 2018-08-19 10:05 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>> Hey all,
>>
>> In the past it was worked for us to depend on VTK 8.1 with
>>
>> find_package(VTK 8.1 ....)
>>
>> But now I'm having trouble with a setup like this:
>>
>> - Windows 10
>> - CMake 3.12.1
>> - VTK 8.1.1
>>
>> The error I get when configuring our project is:
>>
>> -- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.16299.
>> CMake Error at CMakeLists.txt:29 (find_package):
>> Could not find a configuration file for package "VTK" that is compatible
>> with requested version "8.1".
>>
>> The following configuration files were considered but not accepted:
>>
>> C:/Users/Elvis/Dev/VTK-8.1.1-inst/lib/cmake/vtk-8.1/VTKConfig.cmake,
>> version: 8.1.1 (64bit)
>>
>> This is nonsensical to me. Version 8.1.1 (which was found) should be
>> able to satisfy 8.1.
>>
>> Just to test, I set the dependency in our CMakeLists.txt to exactly
>> 8.1.1, and got:
>>
>> -- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.16299.
>> CMake Error at CMakeLists.txt:29 (find_package):
>> Could not find a configuration file for package "VTK" that is compatible
>> with requested version "8.1.1".
>>
>> The following configuration files were considered but not accepted:
>>
>> C:/Users/Elvis/Dev/VTK-8.1.1-inst/lib/cmake/vtk-8.1/VTKConfig.cmake,
>> version: 8.1.1 (64bit)
>>
>> Which makes it obvious something is not right.
>>
>> For reference, cmake was invoked like
>>
>> cmake -DCMAKE_PREFIX_PATH=C:/Users/Elvis/Dev/qwt-6.1.2-inst;C:/Users/Elvis/Dev/VTK-8.1.1-inst;C:/Users/Elvis/Dev/HDF5/1.10.2;C:/Users/Elvis/Dev/karchive-5.36.0-inst
>> ..
>>
>> where C:/Users/Elvis/Dev/VTK-8.1.1-inst is the installation prefix of VTK.
>>
>> Any ideas? Was there some change in CMake recently that could have caused this?
>>
>> Many thanks in advance,
>> Elvis
More information about the vtkusers
mailing list