cmake to handle LOCAL_DIR