added the REQUIRED flag for libconfig and protobuf-c
better cmake implementation