I thought it might be an error because of some kind of cached variable. I trashed the whole kstars directory and cloned the repo.
Same error:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/StellarSolver/StellarSolverConfig.cmake:89 (message):
The imported target "StellarSolver::stellarsolver" references the file