Adaptation of CMakeList to handle both client and server-sided compilation