Warning, /plasma/oxygen/cursors/src/make_config.cmake is written in an unsupported language. File is not indexed.

0001 macro(adjust in_size in_xhot in_yhot)
0002    #math(EXPR out_size "( ${in_size} * ${resolution} ) / 90")
0003    # The Oxygen cursors have different default sizes at 90 dpi:
0004    # Some have 24x24 px, others have 32x32 px. This causes some
0005    # side-effects when you want to choose your cursor size.
0006    # Instead of the real in_size, we use 24 as convenience value.
0007    # Xcursorlib interpretats this as a _nominal_ size; it is legal
0008    # that the nominal size is different from the real size of the
0009    # png image.
0010    math(EXPR out_size "( 24 * ${resolution} ) / 90")
0011    math(EXPR out_xhot "( ${in_xhot} * ${resolution} ) / 90")
0012    math(EXPR out_yhot "( ${in_yhot} * ${resolution} ) / 90")
0013    set(out_line "${out_size} ${out_xhot} ${out_yhot} ${resolution}/${ARGN}")
0014    string(REPLACE ";" " " out_line "${out_line}")
0015    list(APPEND out_contents "${out_line}")
0016 endmacro(adjust)
0017 
0018 # load config file
0019 file(READ "${config}" in_contents)
0020 set(out_contents)
0021 string(REPLACE "\n" ";" in_contents "${in_contents}")
0022 # convert the coma separated list in a standard list
0023 string(REPLACE "," ";" resolutions ${resolutions})
0024 # adjust the config file
0025 foreach(resolution ${resolutions})
0026    foreach(in_line ${in_contents})
0027       string(REGEX REPLACE "[ \t]+" ";" in_line "${in_line}")
0028       adjust(${in_line})
0029    endforeach(in_line)
0030 endforeach(resolution)
0031 # save the adjusted config file
0032 string(REPLACE ";" "\n" out_contents "${out_contents}")
0033 file(WRITE "${output}" "${out_contents}\n")