How to ensure CMAKE_SOURCE_DIR is set correctly?