Rework cmake code
It is common practice to split the cmake code into multiple CMakeLists.txt files. The top-level file takes care of general project setup and looks for the dependencies. src/CMakeLists.txt then deals with the targets and can be further split if appropriate. This leads to more maintainable cmake code