mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
cmake: make building manpages an option
This commit is contained in:
parent
92e7c4f940
commit
a25ce00935
2 changed files with 26 additions and 7 deletions
|
@ -96,7 +96,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_AWECLIENT_NAME}
|
|||
${LIB_READLINE}
|
||||
${LIB_NCURSES})
|
||||
|
||||
IF(AWESOME_GENERATE_MAN)
|
||||
IF(GENERATE_MANPAGES)
|
||||
# Create luadoc file
|
||||
EXECUTE_PROCESS(COMMAND ${CAT_EXECUTABLE} ${AWE_SRCS}
|
||||
COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
|
||||
|
@ -125,8 +125,10 @@ ENDIF()
|
|||
INSTALL(TARGETS ${PROJECT_AWE_NAME} ${PROJECT_AWECLIENT_NAME} RUNTIME DESTINATION bin)
|
||||
INSTALL(FILES ${AWE_LUA_FILES} DESTINATION ${AWESOME_REL_LUA_LIB_PATH})
|
||||
INSTALL(FILES ${AWE_CONF_FILES} DESTINATION ${AWESOME_REL_CONF_PATH})
|
||||
INSTALL(FILES ${AWE_MAN1_NAME} DESTINATION ${AWESOME_MAN1_PATH})
|
||||
INSTALL(FILES ${AWE_MAN5_NAME} DESTINATION ${AWESOME_MAN5_PATH})
|
||||
IF(GENERATE_MANPAGES)
|
||||
INSTALL(FILES ${AWE_MAN1_NAME} DESTINATION ${AWESOME_MAN1_PATH})
|
||||
INSTALL(FILES ${AWE_MAN5_NAME} DESTINATION ${AWESOME_MAN5_PATH})
|
||||
ENDIF()
|
||||
INSTALL(DIRECTORY ${AWE_ICON_DIR} DESTINATION ${AWESOME_REL_ICON_PATH})
|
||||
|
||||
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -12,6 +12,7 @@ SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
|||
|
||||
OPTION(WITH_DBUS "build with D-BUS" ON)
|
||||
OPTION(WITH_IMLIB2 "build with Imlib2" ON)
|
||||
OPTION(GENERATE_MANPAGES "generate manpages" ON)
|
||||
|
||||
ADD_DEFINITIONS(-std=gnu99 -ggdb3 -fno-strict-aliasing -Wall -Wextra
|
||||
-Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings
|
||||
|
@ -19,7 +20,7 @@ ADD_DEFINITIONS(-std=gnu99 -ggdb3 -fno-strict-aliasing -Wall -Wextra
|
|||
-Wpointer-arith -Wredundant-decls -Wformat-nonliteral
|
||||
-Wno-format-zero-length -Wmissing-format-attribute)
|
||||
|
||||
# {{{ external utilities
|
||||
# {{{ Find external utilities
|
||||
FIND_PROGRAM(CAT_EXECUTABLE cat)
|
||||
FIND_PROGRAM(GIT_EXECUTABLE git)
|
||||
FIND_PROGRAM(LUA_EXECUTABLE lua)
|
||||
|
@ -33,6 +34,25 @@ INCLUDE(FindDoxygen)
|
|||
INCLUDE(FindPkgConfig)
|
||||
# }}}
|
||||
|
||||
# {{{ Check if manpages can be build
|
||||
IF(GENERATE_MANPAGES)
|
||||
IF(NOT ASCIIDOC_EXECUTABLE OR NOT XMLTO_EXECUTABLE OR NOT GZIP_EXECUTABLE)
|
||||
IF(NOT ASCIIDOC_EXECUTABLE)
|
||||
SET(missing "asciidoc")
|
||||
ENDIF()
|
||||
IF(NOT XMLTO_EXECUTABLE)
|
||||
SET(missing ${missing} " xmlto")
|
||||
ENDIF()
|
||||
IF(NOT GZIP_EXECUTABLE)
|
||||
SET(missing ${missing} " gzip")
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "Not generating manpages. Missing: " ${missing})
|
||||
SET(GENERATE_MANPAGES OFF)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
# }}}
|
||||
|
||||
# If this is a git repository...
|
||||
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD)
|
||||
# ...update version
|
||||
|
@ -124,9 +144,6 @@ IF(NOT LUA_LIB)
|
|||
MESSAGE(FATAL_ERROR "lua library not found")
|
||||
ENDIF()
|
||||
|
||||
IF(ASCIIDOC_EXECUTABLE AND XMLTO_EXECUTABLE AND GZIP_EXECUTABLE)
|
||||
SET(AWESOME_GENERATE_MAN TRUE)
|
||||
ENDIF()
|
||||
|
||||
# Set awesome informations and path
|
||||
IF(DEFINED PREFIX)
|
||||
|
|
Loading…
Reference in a new issue