Skip to content

Commit

Permalink
Adding installation of MAN pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vfonov committed Jul 22, 2015
1 parent 9dbb6ed commit 50c8a89
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmake-modules/InstallManPages.cmake
@@ -0,0 +1,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 )
6 changes: 6 additions & 0 deletions minc-toolkit-config.apple.csh.cmake
Expand Up @@ -15,6 +15,12 @@ else
setenv DYLD_LIBRARY_PATH @CMAKE_INSTALL_PREFIX@/lib:@CMAKE_INSTALL_PREFIX@/lib/InsightToolkit:${DYLD_LIBRARY_PATH}
endif

if ( ! ${?MANPATH} ) then
setenv MANPATH @CMAKE_INSTALL_PREFIX@/man
else
setenv MANPATH @CMAKE_INSTALL_PREFIX@/man:${MANPATH}
endif


setenv MNI_DATAPATH @CMAKE_INSTALL_PREFIX@/share

Expand Down
1 change: 1 addition & 0 deletions minc-toolkit-config.apple.sh.cmake
Expand Up @@ -8,3 +8,4 @@ export MNI_DATAPATH=@CMAKE_INSTALL_PREFIX@/share
export MINC_FORCE_V2=1
export MINC_COMPRESS=4
export VOLUME_CACHE_THRESHOLD=-1
export MANPATH=@CMAKE_INSTALL_PREFIX@/man:${MANPATH}
5 changes: 5 additions & 0 deletions minc-toolkit-config.unix.csh.cmake
Expand Up @@ -15,6 +15,11 @@ else
setenv LD_LIBRARY_PATH @CMAKE_INSTALL_PREFIX@/lib:@CMAKE_INSTALL_PREFIX@/lib/InsightToolkit:${LD_LIBRARY_PATH}
endif

if ( ! ${?MANPATH} ) then
setenv MANPATH @CMAKE_INSTALL_PREFIX@/man
else
setenv MANPATH @CMAKE_INSTALL_PREFIX@/man:${MANPATH}
endif

setenv MNI_DATAPATH @CMAKE_INSTALL_PREFIX@/share

Expand Down
1 change: 1 addition & 0 deletions minc-toolkit-config.unix.sh.cmake
Expand Up @@ -8,3 +8,4 @@ export MNI_DATAPATH=@CMAKE_INSTALL_PREFIX@/share
export MINC_FORCE_V2=1
export MINC_COMPRESS=4
export VOLUME_CACHE_THRESHOLD=-1
export MANPATH=@CMAKE_INSTALL_PREFIX@/man:${MANPATH}

0 comments on commit 50c8a89

Please sign in to comment.