Skip to content

Commit

Permalink
change FREECIV_ENABLE_MANPAGES to an option
Browse files Browse the repository at this point in the history
  • Loading branch information
jwrober committed Jul 8, 2023
1 parent 44d034d commit 33e875a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
14 changes: 7 additions & 7 deletions cmake/FreecivInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ if(UNIX AND NOT APPLE)
if(FREECIV_ENABLE_MANPAGES)
install(
FILES
${CMAKE_BINARY_DIR}/man/freeciv21-client.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-client.6
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man6
COMPONENT freeciv21
)
Expand All @@ -208,10 +208,10 @@ if(UNIX AND NOT APPLE)
if(FREECIV_ENABLE_MANPAGES)
install(
FILES
${CMAKE_BINARY_DIR}/man/freeciv21-server.6
${CMAKE_BINARY_DIR}/man/freeciv21-game-manual.6
${CMAKE_BINARY_DIR}/man/freeciv21-manual.6
${CMAKE_BINARY_DIR}/man/freeciv21-ruleup.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-server.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-game-manual.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-manual.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-ruleup.6
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man6
COMPONENT freeciv21
)
Expand All @@ -238,8 +238,8 @@ if(UNIX AND NOT APPLE)
if(FREECIV_ENABLE_MANPAGES)
install(
FILES
${CMAKE_BINARY_DIR}/man/freeciv21-modpack-qt.6
${CMAKE_BINARY_DIR}/man/freeciv21-modpack.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-modpack-qt.6
${CMAKE_BINARY_DIR}/docs/man/freeciv21-modpack.6
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man6
COMPONENT freeciv21
)
Expand Down
5 changes: 2 additions & 3 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# CMakeLists for Freeciv21 Docs

set(FREECIV_ENABLE_MANPAGES FALSE)
find_package(Sphinx QUIET)

if(SPHINX_FOUND)
message(STATUS "Sphinx Found, configuring.")
set(FREECIV_ENABLE_MANPAGES TRUE)
option(FREECIV_ENABLE_MANPAGES "Enable manpages" ON)
set(SPHINX_SOURCE ${CMAKE_SOURCE_DIR}/docs)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR})
set(SPHINX_MAN ${CMAKE_CURRENT_BINARY_DIR}/man)
Expand All @@ -26,5 +25,5 @@ if(SPHINX_FOUND)
endif()
else()
message(STATUS "Sphinx NOT Found.")
set(FREECIV_ENABLE_MANPAGES FALSE)
option(FREECIV_ENABLE_MANPAGES "Enable manpages" OFF)
endif()

0 comments on commit 33e875a

Please sign in to comment.