VTK9.3.0 compiled libraries can not be found in OpenCascade

On my laptop with arch linux OS, I want to use vtk in OpenCascade (OCCT 7.8.0), so i download vtk with the lateset release vtk 9.3.1 and compiled it, installed the files and the libs in my specific directory. But the compiled vtk lib names are generated with the suffix of version -9.3, such as libvtkCommonCore-9.3.so libvtkCommonCore-9.3.so.1 libvtkCommonCore-9.3.so.9.3, which made compiler can not find the libs when compile OCCT. This is actually a problem I posted on OCCT forum.

After several hours searching, reading and testing, I altered the cmake variable VTK_CUSTOM_LIBRARY_SUFFIX in the CMakeLists.txt to make the compiler generate lib without the suffix of the version, and i still failed to alter the OpenGL related libs, such as libvtkRenderingOpenGL2.so which OCCT recognizes libvtkRenderingOpenGL without the character 2.

This is trival but necessary. Although i can changed the lib names manually, it is cumbersome and seems like there should be a better solution. Is the name issue should be solved by OCCT or VTK ? Thans for any suggestion.

Hi @riverandroad

The usual way to use a compiled VTK library through CMake is to use the CMake variable -DVTK_DIR:PATH=/install/folder/lib/cmake/vtk-9.3 which contains the vtk-config.cmake file.

I’m not familiar with OCCT build system, but it looks like it uses CMake with the classic find_package(VTK ...) command. So the above method should work.

Let us know if it helps.

Best,
François