allow one to set manpage destination

This commit is contained in:
Andrew Bauer 2018-12-07 09:47:00 -06:00
parent a1141d2dc4
commit db81465fa2
4 changed files with 10 additions and 5 deletions

View File

@ -127,7 +127,8 @@ mark_as_advanced(
ZM_PATH_ARP ZM_PATH_ARP
ZM_CONFIG_DIR ZM_CONFIG_DIR
ZM_CONFIG_SUBDIR ZM_CONFIG_SUBDIR
ZM_SYSTEMD) ZM_SYSTEMD
ZM_MANPAGE_DEST_PREFIX)
set(ZM_RUNDIR "/var/run/zm" CACHE PATH set(ZM_RUNDIR "/var/run/zm" CACHE PATH
"Location of transient process files, default: /var/run/zm") "Location of transient process files, default: /var/run/zm")
@ -210,6 +211,10 @@ set(ZM_TARGET_DISTRO "" CACHE STRING
"Build ZoneMinder for a specific distribution. Currently, valid names are: fc27, fc26, el7, OS13, FreeBSD") "Build ZoneMinder for a specific distribution. Currently, valid names are: fc27, fc26, el7, OS13, FreeBSD")
set(ZM_SYSTEMD "OFF" CACHE BOOL set(ZM_SYSTEMD "OFF" CACHE BOOL
"Set to ON to force building ZM with systemd support. default: OFF") "Set to ON to force building ZM with systemd support. default: OFF")
set(ZM_MANPAGE_DEST_PREFIX "share/man" CACHE PATH
"Relative path used to install ZoneMinder's Man pages into a
non-standard folder. Most Linux users will not need to change this.
BSD users may need to set this.")
# Reassign some variables if a target distro has been specified # Reassign some variables if a target distro has been specified
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))

View File

@ -21,7 +21,7 @@
# To use it, include this file in CMakeLists.txt and # To use it, include this file in CMakeLists.txt and
# invoke POD2MAN(<podfile> <manfile> <section>) # invoke POD2MAN(<podfile> <manfile> <section>)
MACRO(POD2MAN PODFILE MANFILE SECTION) MACRO(POD2MAN PODFILE MANFILE SECTION MANPAGE_DEST_PREFIX)
FIND_PROGRAM(POD2MAN pod2man) FIND_PROGRAM(POD2MAN pod2man)
FIND_PROGRAM(GZIP gzip) FIND_PROGRAM(GZIP gzip)
@ -58,7 +58,7 @@ MACRO(POD2MAN PODFILE MANFILE SECTION)
INSTALL( INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
DESTINATION share/man/man${SECTION} DESTINATION ${MANPAGE_DEST_PREFIX}/man${SECTION}
) )
ENDMACRO(POD2MAN PODFILE MANFILE SECTION) ENDMACRO(POD2MAN PODFILE MANFILE SECTION)

View File

@ -31,7 +31,7 @@ configure_file(zm.in "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
file(GLOB perlscripts "*.pl") file(GLOB perlscripts "*.pl")
FOREACH(PERLSCRIPT ${perlscripts}) FOREACH(PERLSCRIPT ${perlscripts})
get_filename_component(PERLSCRIPTNAME ${PERLSCRIPT} NAME) get_filename_component(PERLSCRIPTNAME ${PERLSCRIPT} NAME)
POD2MAN(${PERLSCRIPT} zoneminder-${PERLSCRIPTNAME} 8) POD2MAN(${PERLSCRIPT} zoneminder-${PERLSCRIPTNAME} 8 ${ZM_MANPAGE_DEST_PREFIX})
ENDFOREACH(PERLSCRIPT ${perlscripts}) ENDFOREACH(PERLSCRIPT ${perlscripts})
# Install the perl scripts # Install the perl scripts

View File

@ -21,7 +21,7 @@ target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
# Generate man files for the binaries destined for the bin folder # Generate man files for the binaries destined for the bin folder
FOREACH(CBINARY zma zmc zmu) FOREACH(CBINARY zma zmc zmu)
POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8) POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8 ${ZM_MANPAGE_DEST_PREFIX})
ENDFOREACH(CBINARY zma zmc zmu) ENDFOREACH(CBINARY zma zmc zmu)
install(TARGETS zmc zma zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(TARGETS zmc zma zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)