~mc-return/compiz/compiz.merge-src-screen.cpp-improvements

« back to all changes in this revision

Viewing changes to metadata/CMakeLists.txt

  • Committer: Dennis kasprzyk
  • Author(s): Dennis Kasprzyk
  • Date: 2009-03-15 05:09:18 UTC
  • Revision ID: git-v1:163f6b6f3c3b7764987cbdf8e03cc355edeaa499
New generalized build system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
set (_plugin_files
2
 
    core
3
 
    annotate
4
 
    blur
5
 
    clone
6
 
    commands
7
 
    cube
8
 
    dbus
9
 
    decor
10
 
    fade
11
 
    fs
12
 
    gconf
13
 
    glib
14
 
    gnomecompat
15
 
    imgpng
16
 
    imgsvg
17
 
    ini
18
 
    inotify
19
 
    minimize
20
 
    move
21
 
    obs
22
 
    place
23
 
    regex
24
 
    resize
25
 
    rotate
26
 
    scale
27
 
    screenshot
28
 
    switcher
29
 
    video
30
 
    water
31
 
    wobbly
32
 
    zoom
33
 
    composite
34
 
    opengl
35
 
    copytex
 
1
set (
 
2
    COMPIZ_DEFAULT_PLUGINS ${COMPIZ_DEFAULT_PLUGINS} CACHE STRING
 
3
    "Default plugins list that will be added to core metadata file"
36
4
)
37
5
 
 
6
find_program (XSLTPROC_EXECUTABLE xsltproc)
 
7
mark_as_advanced (FORCE XSLTPROC_EXECUTABLE)
 
8
 
 
9
if (XSLTPROC_EXECUTABLE)
 
10
 
 
11
    if (NOT ${COMPIZ_DEFAULT_PLUGINS})
 
12
      set (COMPIZ_DEFAULT_PLUGINS "core")
 
13
    endif ()
 
14
 
 
15
    add_custom_command (
 
16
        OUTPUT ${CMAKE_BINARY_DIR}/generated/core.xml.in
 
17
        COMMAND ${XSLTPROC_EXECUTABLE}
 
18
                -o ${CMAKE_BINARY_DIR}/generated/core.xml.in
 
19
                --param default_plugins "\"'${COMPIZ_DEFAULT_PLUGINS}'\""
 
20
                ${CMAKE_SOURCE_DIR}/xslt/default_plugins.xslt
 
21
                ${CMAKE_CURRENT_SOURCE_DIR}/core.xml.in
 
22
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/core.xml.in
 
23
    )
 
24
    set (_core_file "${CMAKE_BINARY_DIR}/generated/core.xml.in")
 
25
else ()
 
26
    set (_core_file "${CMAKE_CURRENT_SOURCE_DIR}/core.xml.in")
 
27
endif ()
 
28
 
 
29
 
38
30
set (_xml_targets)
39
31
set (_schema_targets)
40
32
 
41
 
foreach (_plugin ${_plugin_files})
42
 
 
43
 
    translate_xml (
44
 
        ${CMAKE_CURRENT_SOURCE_DIR}/${_plugin}.xml.in
45
 
        ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.xml
46
 
    )
47
 
 
48
 
    install (
49
 
        FILES ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.xml
50
 
        DESTINATION ${compiz_metadatadir}
51
 
    )
52
 
 
53
 
    if (USE_GCONF)
54
 
        generate_gconf_schema (
55
 
            ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.xml
56
 
            ${CMAKE_CURRENT_BINARY_DIR}/compiz-${_plugin}.schemas
57
 
        )
58
 
        install_gconf_schema (${CMAKE_CURRENT_BINARY_DIR}/compiz-${_plugin}.schemas)
59
 
        set (_schema_targets ${_schema_targets} ${CMAKE_CURRENT_BINARY_DIR}/compiz-${_plugin}.schemas)
60
 
    endif (USE_GCONF)
61
 
 
62
 
    set (_xml_targets ${_xml_targets} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.xml)
63
 
endforeach (_plugin)
64
 
 
65
 
add_custom_target (xml-files ALL
66
 
    DEPENDS ${_xml_targets}
 
33
compiz_translate_xml (
 
34
    ${_core_file}
 
35
    ${CMAKE_BINARY_DIR}/generated/core.xml
 
36
)
 
37
 
 
38
install (
 
39
    FILES ${CMAKE_BINARY_DIR}/generated/core.xml
 
40
    DESTINATION ${compiz_metadatadir}
 
41
)
 
42
 
 
43
add_custom_target (core-xml-file ALL
 
44
    DEPENDS ${CMAKE_BINARY_DIR}/generated/core.xml
67
45
)
68
46
 
69
47
if (USE_GCONF)
70
 
    add_custom_target (gconf-schemas ALL
71
 
        DEPENDS ${_schema_targets}
72
 
    )
73
 
endif (USE_GCONF)
 
48
    compiz_gconf_schema (
 
49
        ${CMAKE_BINARY_DIR}/generated/core.xml
 
50
        ${CMAKE_BINARY_DIR}/generated/compiz-core.schemas
 
51
        ${SCHEMADIR}
 
52
    )
 
53
    add_custom_target (core-gconf-schema ALL
 
54
        DEPENDS ${CMAKE_BINARY_DIR}/generated/compiz-core.schemas
 
55
    )
 
56
endif ()