Hi,
I downloaded version 8.2.0 of VTK from the website and CMaked it with default settings (the only flag being CMAKE_INSTALL_PREFIX
; CMake version 3.10.2 on Ubuntu 18.04.3 LTS). Now, running e.g.:
ldd -r ${HOME}/VTK/8.2.0/install/lib/libvtkRenderingOpenGL2-8.2.so
yields many undefined symbol
s: indeed it cannot find the VTK libraries it depends on, what suggests -Wl,-rpath
was not included when building them.
However, if I build an executable (the only flag being VTK_DIR
), -Wl,-rpath
is included by default and adds to the binary the VTK libraries it immediately depends on, but these have their dependencies themselves and they remain undefined. A minimum CMakeLists.txt
is used to build the executable:
cmake_minimum_required(VERSION 2.8.7)
project(example)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
set(SOURCES example.cpp)
add_executable(example ${SOURCES})
target_link_libraries(example ${VTK_LIBRARIES})
Is this a desired behaviour in VTK installation? Is there a way to install it with cross-knowledge between its libraries’ locations?
Thank you very much,