CMake: install man/man1/ pages when present (fixes #5491)

This commit is contained in:
Even Rouault 2022-03-28 15:00:05 +02:00
parent 843cab3a30
commit 6d0ea6dc5a
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D
4 changed files with 11 additions and 1 deletions

1
.gitignore vendored
View File

@ -137,7 +137,6 @@ fuzzers/tests/test_ogr_fuzzer
fuzzers/tests/test_osr_set_from_user_input_fuzzer
fuzzers/tests/test_wkb_import_fuzzer
fuzzers/tests/test_wkt_import_fuzzer
man/
html/
nmake.local*
*~

View File

@ -477,6 +477,7 @@ target_link_libraries(${GDAL_LIB_TARGET_NAME} PRIVATE ${GDAL_PRIVATE_LINK_LIBRAR
if (BUILD_DOCS)
add_subdirectory(doc)
endif ()
add_subdirectory(man)
# GDAL 4.0 ? Install headers in ${CMAKE_INSTALL_INCLUDEDIR}/gdal ?
set(GDAL_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})

8
man/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
# Man pages are not not present in the git repository. They are generated
# at release preparation time by the mkgdaldist.sh script
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man1/gdalinfo.1)
install(DIRECTORY man1/ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
FILES_MATCHING PATTERN "*.1")
endif()

2
man/man1/README.txt Normal file
View File

@ -0,0 +1,2 @@
Man pages are not not present in the git repository. They are generated
at release preparation time by the mkgdaldist.sh script