comparison plugins/CMakeLists.txt @ 207:6635b9187d71

Irccd: switch to 4 spaces indent, #518
author David Demelier <markand@malikania.fr>
date Tue, 21 Jun 2016 20:52:17 +0200
parents ff26bd33a45d
children f04acabfbbe5
comparison
equal deleted inserted replaced
206:11808e98218f 207:6635b9187d71
17 # 17 #
18 18
19 project(plugins) 19 project(plugins)
20 20
21 add_custom_target( 21 add_custom_target(
22 all-plugins ALL 22 all-plugins ALL
23 COMMENT "Irccd plugins" 23 COMMENT "Irccd plugins"
24 ) 24 )
25 25
26 set_target_properties( 26 set_target_properties(
27 all-plugins 27 all-plugins
28 PROPERTIES 28 PROPERTIES
29 FOLDER meta 29 FOLDER meta
30 ) 30 )
31 31
32 foreach (plugin ${IRCCD_PLUGINS}) 32 foreach (plugin ${IRCCD_PLUGINS})
33 string(TOUPPER ${plugin} optname) 33 string(TOUPPER ${plugin} optname)
34 34
35 if (WITH_PLUGIN_${optname}) 35 if (WITH_PLUGIN_${optname})
36 # 1. Configure the plugin and install it. 36 # 1. Configure the plugin and install it.
37 irccd_define_plugin(${plugin}/${plugin}.js) 37 irccd_define_plugin(${plugin}/${plugin}.js)
38 38
39 # 2. Build documentation. 39 # 2. Build documentation.
40 if (WITH_HTML) 40 if (WITH_HTML)
41 set(basedocdir ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR}) 41 set(basedocdir ${IRCCD_FAKEROOTDIR}/${WITH_DOCDIR})
42 42
43 file(RELATIVE_PATH baseurl ${basedocdir}/plugin ${basedocdir}) 43 file(RELATIVE_PATH baseurl ${basedocdir}/plugin ${basedocdir})
44 44
45 pandoc( 45 pandoc(
46 OUTPUT ${basedocdir}/plugin/${plugin}.html 46 OUTPUT ${basedocdir}/plugin/${plugin}.html
47 SOURCES ${plugin}/${plugin}.md 47 SOURCES ${plugin}/${plugin}.md
48 TEMPLATE ${resources_SOURCE_DIR}/template.html 48 TEMPLATE ${resources_SOURCE_DIR}/template.html
49 DEPENDS 49 DEPENDS
50 ${resources_SOURCE_DIR}/template.html 50 ${resources_SOURCE_DIR}/template.html
51 docs-resources 51 docs-resources
52 ARGS -Vguide 52 ARGS -Vguide
53 VARIABLE baseurl:${baseurl} 53 VARIABLE baseurl:${baseurl}
54 FROM markdown TO html5 54 FROM markdown TO html5
55 STANTALONE MAKE_DIRECTORY TOC 55 STANTALONE MAKE_DIRECTORY TOC
56 ) 56 )
57 57
58 list(APPEND outputs ${basedocdir}/plugin/${plugin}.html) 58 list(APPEND outputs ${basedocdir}/plugin/${plugin}.html)
59 install(FILES ${basedocdir}/plugin/${plugin}.html DESTINATION ${WITH_DOCDIR}/plugin) 59 install(FILES ${basedocdir}/plugin/${plugin}.html DESTINATION ${WITH_DOCDIR}/plugin)
60 endif () 60 endif ()
61 61
62 add_custom_target( 62 add_custom_target(
63 plugin-${plugin} 63 plugin-${plugin}
64 SOURCES 64 SOURCES
65 ${outputs} 65 ${outputs}
66 ${plugin}/${plugin}.js 66 ${plugin}/${plugin}.js
67 ${plugin}/${plugin}.md 67 ${plugin}/${plugin}.md
68 ) 68 )
69 69
70 set_target_properties( 70 set_target_properties(
71 plugin-${plugin} 71 plugin-${plugin}
72 PROPERTIES 72 PROPERTIES
73 PROJECT_LABEL ${plugin} 73 PROJECT_LABEL ${plugin}
74 FOLDER plugins 74 FOLDER plugins
75 ) 75 )
76 76
77 add_dependencies(all-plugins plugin-${plugin}) 77 add_dependencies(all-plugins plugin-${plugin})
78 endif () 78 endif ()
79 endforeach () 79 endforeach ()