Instead of INCLUDE_DIRECTORIES(${LIBVNCCLIENT_INCLUDE_DIR}) the CMake variable INCLUDE_DIRECTORIES(${LIBVNCSERVER_INCLUDE_DIR}) should be used. Attached is a fix for src/osgPlugins/vnc/CMakeLists.txt"