cmake: generate apigendoc.txt

This commit is contained in:
Michael Gehring 2008-06-17 19:46:17 +02:00 committed by Julien Danjou
parent f7d78e1689
commit c5012826d5
2 changed files with 12 additions and 0 deletions

View File

@ -82,7 +82,17 @@ SET( AWE_MAN1_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesome.1.gz
${CMAKE_CURRENT_BINARY_DIR}/awesome-client.1.gz ) ${CMAKE_CURRENT_BINARY_DIR}/awesome-client.1.gz )
SET( AWE_MAN5_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesomerc.5.gz ) SET( AWE_MAN5_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesomerc.5.gz )
SET( AWE_LUADOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/apidocgen.txt )
IF( AWESOME_GENERATE_MAN ) IF( AWESOME_GENERATE_MAN )
# Create luadoc file
FIND_PROGRAM( CAT_EXECUTABLE cat )
EXECUTE_PROCESS( COMMAND ${CAT_EXECUTABLE} ${AWE_SRCS}
COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
OUTPUT_FILE ${AWE_LUADOC_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
FOREACH( txtfile ${AWE_MAN_SRCS}) FOREACH( txtfile ${AWE_MAN_SRCS})
STRING( REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile} ) STRING( REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile} )
STRING( REGEX REPLACE ".xml\$" ".gz" gzipman ${xmlfile} ) STRING( REGEX REPLACE ".xml\$" ".gz" gzipman ${xmlfile} )

View File

@ -70,6 +70,8 @@ FIND_LIBRARY(LUA_LIB NAMES lua5.1 lua
/usr/local/lib /usr/local/lib
../libs/lua-5.1.3/lib) ../libs/lua-5.1.3/lib)
FIND_PROGRAM( LUA_EXECUTABLE lua )
# Error check # Error check
IF( NOT LIB_READLINE ) IF( NOT LIB_READLINE )
MESSAGE( FATAL_ERROR "readline library not found" ) MESSAGE( FATAL_ERROR "readline library not found" )