[kde-common/cmake] tde_create_handbook: added EXTRA directive; *.css files are detected automatically

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1225140 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
master
samelian 13 years ago
parent 6c3831775e
commit 6759dd7183

@ -894,6 +894,7 @@ macro( tde_create_handbook )
unset( _target ) unset( _target )
unset( _dest ) unset( _dest )
unset( _srcs ) unset( _srcs )
unset( _extra )
unset( _srcdir ) unset( _srcdir )
set( _lang en ) set( _lang en )
@ -909,6 +910,13 @@ macro( tde_create_handbook )
set( _directive 1 ) set( _directive 1 )
endif() endif()
# found directive "EXTRA"
if( "${_arg}" STREQUAL "EXTRA" )
unset( _extra )
set( _var _extra )
set( _directive 1 )
endif()
# found directive "SRCDIR" # found directive "SRCDIR"
if( "${_arg}" STREQUAL "SRCDIR" ) if( "${_arg}" STREQUAL "SRCDIR" )
unset( _srcdir ) unset( _srcdir )
@ -953,9 +961,9 @@ macro( tde_create_handbook )
string( REPLACE "/" "-" _target "${_dest}-handbook" ) string( REPLACE "/" "-" _target "${_dest}-handbook" )
endif() endif()
# if no file specified, include all docbooks and images # if no file specified, include all docbooks, stylesheets and images
if( NOT _srcs ) if( NOT _srcs )
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.docbook *.png ) file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.docbook *.css *.png )
endif() endif()
# if no destination specified, defaulting to HTML_INSTALL_DIR # if no destination specified, defaulting to HTML_INSTALL_DIR
@ -968,7 +976,7 @@ macro( tde_create_handbook )
endif() endif()
if( NOT _srcs ) if( NOT _srcs )
tde_message_fatal( "no docbook or png files" ) tde_message_fatal( "no source files" )
endif() endif()
# check for index.docbook # check for index.docbook
@ -990,7 +998,7 @@ macro( tde_create_handbook )
add_custom_target( ${_target} ALL DEPENDS index.cache.bz2 ) add_custom_target( ${_target} ALL DEPENDS index.cache.bz2 )
install( FILES install( FILES
${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_srcs} ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_srcs} ${_extra}
DESTINATION ${_dest} ) DESTINATION ${_dest} )
tde_install_symlink( ${HTML_INSTALL_DIR}/${_lang}/common ${_dest} ) tde_install_symlink( ${HTML_INSTALL_DIR}/${_lang}/common ${_dest} )

Loading…
Cancel
Save