fixed permission problem
changed library flags to CXX_FLAGS instead of ADD_Definitions