The extension libraries might depend on libXext or libX11, so
make sure they come last on the link line.
../vncconfig/QueryConnectDialog.cxx
)
-target_link_libraries(x0vncserver tx rfb network rdr ${X11_LIBRARIES})
+target_link_libraries(x0vncserver tx rfb network rdr)
if(X11_FOUND AND X11_XTest_LIB)
add_definitions(-DHAVE_XTEST)
message(WARNING "No DAMAGE extension. x0vncserver will have to use the slower polling method.")
endif()
+target_link_libraries(x0vncserver ${X11_LIBRARIES})
+
install(TARGETS x0vncserver DESTINATION ${BIN_DIR})
install(FILES x0vncserver.man DESTINATION ${MAN_DIR}/man1 RENAME x0vncserver.1)