Library "not found" after building test with CMake on Ubuntu.

Ok - downloaded 9.0.0, now the CMakeLists.txt file is:

cmake_minimum_required(VERSION 3.12)
project("Example")
set(VTK_DIR /home/me/opt/vtk/lib/cmake/vtk-9.0)
find_package(VTK REQUIRED)

add_executable(test test.cpp)
target_link_libraries(test ${VTK_LIBRARIES})
vtk_module_autoinit(TARGETS test
  MODULES ${VTK_LIBRARIES})

The executable builds fine, but only seems to be able to find all of the libraries when LD_LIBRARY_PATH is set (which I would prefer to not do). Apparently when it “worked” above, I was still in the shell that I had set LD_LIBRARY_PATH in.

ldd and readelf show similar results to the first time around.