File: InstallManPages.cmake

package info (click to toggle)
minc-tools 2.3.00%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,532 kB
  • sloc: ansic: 65,671; perl: 7,423; yacc: 1,174; sh: 544; lex: 319; makefile: 220
file content (16 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# install a list of files with names like XXXX.manY into install_prefi/manY/XXXX.Y

macro(INSTALL_MAN_PAGES install_prefix  )
  set(argn "${ARGN}")
  
  foreach(i IN LISTS argn)
    get_filename_component(fname ${i} NAME_WE)
    get_filename_component(fext ${i}  EXT)
    STRING(REGEX REPLACE ".man" "" SECTION ${fext})
    
    #TODO: add gzip compression
    INSTALL(FILES ${i} DESTINATION ${install_prefix}/man${SECTION}/ RENAME ${fname}.${SECTION})
    
  endforeach()
  
endmacro(INSTALL_MAN_PAGES )