Fixed the cmake example to support out-of-source builds