Skip to content

Commit

Permalink
CMake: install man/man1/ pages when present (fixes #5491)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Mar 28, 2022
1 parent 843cab3 commit 6d0ea6d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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*
*~
Expand Down
1 change: 1 addition & 0 deletions gdal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
8 changes: 8 additions & 0 deletions man/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions man/man1/README.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6d0ea6d

Please sign in to comment.