adding dependency of generating cfg to the library targets
fixing CMakeLists.txt to be able to be compiled on travis, adding dependency to gencfg