# Replace the absolute path with a relative one for .json # Note that changes are only valid in *.json.in file file(GLOB model_dirs "${CMAKE_CURRENT_SOURCE_DIR}/*") foreach (model_dir IN LISTS model_dirs) if (IS_DIRECTORY ${model_dir}) set(LOCAL_DIR ${model_dir}) configure_file(${model_dir}/config.json.in ${model_dir}/config.json @ONLY) endif () endforeach ()