Add package building option to cmake.