Will it be perceived negatively to have a PhD thesis unrelated to the rest of my future research or work?
Relative to what? Having a PhD is generally perceived positively relative to lower levels of education, but it is perceived less positively than a PhD that is more directly in the research field in which you intend to practice.
In your case it sounds like you will be within the general field (computer science) that you want to practice in, but you are considering doing a research project that is not of great interest to you. The PhD program is generally considered to be a training program for researchers, and the goal is to get you up to a level where you can do independent peer-reviewed research that is up to the standard acceptable for academic publication. You will probably find that a PhD program in computer science gives you a wide range of high-level skills and abilities in that field, and you will benefit from it even if you end up doing research in other topics in computer science. Having said that, if your PhD is in your future field of research then you get a little head-start, since you are already more familiar with research in that particular topic area. This will not be much of a head-start, since you should graduate from a PhD program with the ability to learn a new area quicker than you learned it during your candidature.
In regard to this issue, it is worth noting that it is extremely common for PhD researchers to move around into different research areas as their career progresses, and correspondingly, it is uncommon for experienced researchers to still be doing research on the same project that they did in their PhD candidature. As you get more experience you will get better and faster at absorbing and understanding material in a new research project, and so the disadvantage of not having researched in a topic before diminishes. Once you are adept at research, you will find that there is not a huge difference in difficulty in researching in the topic of your PhD candidature, versus researching a new project.
...it is not what I would have picked for myself or an area I foresee wanting to work in long term.
I am not worried about lacking the motivation to finish the thesis, or the opportunity cost of not starting directly researching the area I am interested in.
Now for some unsolicited advice - You say that you are not worried about lacking the motivation to finish the thesis. You should be worried. It is a bad idea to take on a PhD candidature unless you are confident that the topic will be able to command your interest and passions for a period of several years in your candidature (usually 3-4 years full-time). If you are already viewing the topic in this way before you even start, it is highly likely that you will lose motivation and struggle with maintaining interest in the topic well before the end of the candidature. This will make your candidature a major burden on you, and it is likely to lead to failure.