~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to cursors/src/setup.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
find_program(TAR tar)
 
2
# TODO abort if tar not found (or does not understand cjf?)
 
3
if(NOT WIN32)
 
4
find_program(INKSCAPE inkscape)
 
5
# TODO abort if inkscape not found
 
6
 
 
7
find_program(XCURSORGEN xcursorgen)
 
8
# TODO abort if xcursorgen not found
 
9
else(NOT WIN32)
 
10
find_program(INKSCAPE inkscape "$ENV{PROGRAMFILES}/Inkscape" "$ENV{INKSCAPE_DIR}")
 
11
endif(NOT WIN32)
 
12
 
 
13
macro(set_dependencies cursor)
 
14
    file(READ ${CONFIGDIR}/${cursor}.in config_contents)
 
15
    string(REPLACE "\n" ";" config_contents ${config_contents})
 
16
    set(${cursor}_inputs)
 
17
    foreach(png ${config_contents})
 
18
        string(REGEX REPLACE "[0-9]* [0-9]* [0-9]* " "" png ${png})
 
19
        string(REGEX REPLACE "[.]png [0-9]*$" ".png" png ${png})
 
20
        list(APPEND ${cursor}_inputs ${png})
 
21
    endforeach(png)
 
22
endmacro(set_dependencies)
 
23
 
 
24
set(CURSORS)
 
25
foreach(config ${CONFIGS})
 
26
    string(REGEX REPLACE ".*/" "" cursor ${config})
 
27
    string(REGEX REPLACE "[.]in" "" cursor ${cursor})
 
28
    list(APPEND CURSORS ${cursor})
 
29
    set_dependencies(${cursor})
 
30
endforeach(config)