Simplified fix.

This commit is contained in:
Ward Fisher 2018-02-28 12:20:53 -07:00
parent 3ccce81190
commit c4551856d4

View File

@ -52,16 +52,14 @@ ENDIF(BUILD_PARALLEL)
# Generate the man page.
IF(HAVE_M4)
STRING(REPLACE "&" "\&" TMP_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
FILE(GLOB libsrc_MANPAGE ${CMAKE_SOURCE_DIR}/docs/netcdf.m4)
FILE(COPY ${libsrc_MANPAGE} DESTINATION ${TMP_CMAKE_CURRENT_BINARY_DIR})
MESSAGE("")
MESSAGE("TMP_CMAKE_CURRENT_BINARY_DIR: ${TMP_CMAKE_CURRENT_BINARY_DIR}")
FILE(COPY ${libsrc_MANPAGE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ADD_CUSTOM_TARGET(manpage ALL
COMMAND ${NC_M4} ${ARGS_MANPAGE} '${TMP_CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${TMP_CMAKE_CURRENT_BINARY_DIR}/netcdf.3'
WORKING_DIRECTORY ${TMP_CMAKE_CURRENT_BINARY_DIR}
COMMAND ${NC_M4} ${ARGS_MANPAGE} '${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${CMAKE_CURRENT_BINARY_DIR}/netcdf.3'
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/netcdf.3 DESTINATION "share/man/man3" COMPONENT documentation)