CMAKE 批量获取目录下指定类型文件并转换为相对路径
# 使用GLOB_RECURSE递归遍历子目录file(GLOB_RECURSE ICON_PATH *.png)set(REL_ICON_PATH "")# 生成的单个相对路径为rel_path, 存入REL_ICON_PATH中foreach(path ${ICON_PATH}) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" rel_path ${path}) set(REL_IC