File: CMakeLists.txt

package info (click to toggle)
libcerf 3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 760 kB
  • sloc: ansic: 4,905; f90: 250; makefile: 18
file content (47 lines) | stat: -rw-r--r-- 1,624 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function(one_page pname section srcname)
    add_custom_command(
        OUTPUT "${pname}.${section}"
        COMMAND pod2man -s ${section} -c "libcerf manual" -n "${pname}"
            "${CMAKE_CURRENT_SOURCE_DIR}/${srcname}.pod"
            "${CMAKE_CURRENT_BINARY_DIR}/${pname}.${section}"
        DEPENDS ${srcname}.pod
        )
    add_custom_command(
        OUTPUT ${pname}.html
        COMMAND pod2html --title="libcerf manual" --noindex
            ${CMAKE_CURRENT_SOURCE_DIR}/${srcname}.pod
            > ${CMAKE_CURRENT_BINARY_DIR}/${pname}.html
        DEPENDS ${srcname}.pod
        )
    install(
        FILES ${CMAKE_CURRENT_BINARY_DIR}/${pname}.${section}
        DESTINATION "${CMAKE_INSTALL_MANDIR}/man${section}"
        )
    install(
        FILES ${CMAKE_CURRENT_BINARY_DIR}/${pname}.html
        DESTINATION "${CMAKE_INSTALL_DOCDIR}/html"
        )
    set(TARGETS_MAN "${TARGETS_MAN};${pname}.${section}" PARENT_SCOPE)
    set(TARGETS_HTM "${TARGETS_HTM};${pname}.html"       PARENT_SCOPE)
endfunction()

set(TARGETS_MAN "")
set(TARGETS_HTM "")

one_page(cerf       3 cerf)
one_page(cerfc      3 cerf)
one_page(dawson     3 dawson)
one_page(cdawson    3 dawson)
one_page(erfcx      3 erfcx)
one_page(cerfcx     3 erfcx)
one_page(erfi       3 erfi)
one_page(cerfi      3 erfi)
one_page(voigt      3 voigt)
one_page(voigt_hwhm 3 voigt_hwhm)
one_page(w_of_z     3 w_of_z)
one_page(im_w_of_z  3 w_of_z)

# message(STATUS "targets man: ${TARGETS_MAN}")
# message(STATUS "targets htm: ${TARGETS_HTM}")
add_custom_target(man  ALL DEPENDS ${TARGETS_MAN})
add_custom_target(html ALL DEPENDS ${TARGETS_HTM})