Add cmake rules into dist archive Fixes: #502 Refs: #551 (cherry picked from commit 69bc2da79fb2f358c22feba45e9ad4752729d320)