Moved reading flags.cmake after declaring target to be able to add link libraries
Added example for flags.cmake