Better xterm (add the thingies on top/bottom).
[oxy-cursors.git] / src / make_config.cmake
blob564601eae6e38eeff5911cbdd226430acd18b61e
1 macro(adjust in_size in_xhot in_yhot)
2    math(EXPR out_size "( ${in_size} * ${dpi} ) / 90")
3    math(EXPR out_xhot "( ${in_xhot} * ${dpi} ) / 90")
4    math(EXPR out_yhot "( ${in_yhot} * ${dpi} ) / 90")
5    set(out_line "${out_size} ${out_xhot} ${out_yhot} ${ARGN}")
6    string(REPLACE ";" " " out_line "${out_line}")
7    list(APPEND out_contents "${out_line}")
8 endmacro(adjust)
10 file(READ "${config}" in_contents)
11 set(out_contents)
12 string(REPLACE "\n" ";" in_contents "${in_contents}")
13 foreach(in_line ${in_contents})
14    string(REGEX REPLACE "[ \t]+" ";" in_line "${in_line}")
15    adjust(${in_line})
16 endforeach(in_line)
17 string(REPLACE ";" "\n" out_contents "${out_contents}")
18 file(WRITE "${output}" "${out_contents}\n")