@ -1,7 +1,7 @@
# m a i n p r o j e c t f i l e . u s e i t f r o m a b u i l d s u b - f o l d e r , s e e C O M P I L E f o r d e t a i l s
# # s o m e g e n e r i c C M a k e m a g i c
cmake_minimum_required ( VERSION 2.8.12 FATAL_ERROR )
cmake_minimum_required ( VERSION 3.6 FATAL_ERROR )
cmake_policy ( SET CMP0048 NEW )
project ( dfhack )
@ -450,37 +450,47 @@ if(BUILD_DOCS)
message ( SEND_ERROR "Sphinx not found but BUILD_DOCS enabled" )
endif ( )
file ( GLOB SPHINX_DEPS
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / * . r s t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / g u i d e s / * . r s t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / c h a n g e l o g . t x t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / g e n _ c h a n g e l o g . p y "
file ( GLOB SPHINX_GLOB_DEPS
L I S T _ D I R E C T O R I E S f a l s e
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / i m a g e s / * . p n g "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / s t y l e s / * "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f . p y "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s c r i p t s / a b o u t . t x t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s c r i p t s / * / a b o u t . t x t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d a t a / i n i t / * i n i t "
)
file ( GLOB_RECURSE SPHINX_GLOB_RECURSE_DEPS
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / * . r s t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c h a n g e l o g . t x t "
)
list ( FILTER SPHINX_GLOB_RECURSE_DEPS
E X C L U D E R E G E X " d o c s / _ "
)
file ( GLOB_RECURSE SPHINX_SCRIPT_DEPS
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s c r i p t s / * . l u a "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s c r i p t s / * . r b "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s c r i p t s / * . t x t "
)
set ( SPHINX_DEPS ${ SPHINX_DEPS } ${ SPHINX_SCRIPT_DEPS }
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / L I C E N S E . r s t "
set ( SPHINX_DEPS ${ SPHINX_GLOB_DEPS } ${ SPHINX_GLOB_RECURSE_DEPS } ${ SPHINX_SCRIPT_DEPS }
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / C M a k e L i s t s . t x t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f . p y "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / g e n _ c h a n g e l o g . p y "
)
set ( SPHINX_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/html/.buildinfo" )
set_source_files_properties ( ${ SPHINX_OUTPUT } PROPERTIES GENERATED TRUE )
add_custom_command ( OUTPUT ${ SPHINX_OUTPUT }
C O M M A N D $ { S P H I N X _ E X E C U T A B L E }
- a - E - q - b h t m l
- q - b h t m l - d " $ { C M A K E _ B I N A R Y _ D I R } / d o c s / h t m l "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / h t m l "
- w " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / _ s p h i n x - w a r n i n g s . t x t "
- j 2
- w " $ { C M A K E _ B I N A R Y _ D I R } / d o c s / h t m l / _ s p h i n x - w a r n i n g s . t x t "
- j a u t o
C O M M A N D $ { S P H I N X _ E X E C U T A B L E }
- q - b t e x t - d " $ { C M A K E _ B I N A R Y _ D I R } / d o c s / t e x t "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / d o c s / t e x t "
- w " $ { C M A K E _ B I N A R Y _ D I R } / d o c s / t e x t / _ s p h i n x - w a r n i n g s . t x t "
- j a u t o
D E P E N D S $ { S P H I N X _ D E P S }
C O M M E N T " B u i l d i n g H T M L d o c u m e n t a t i o n w i t h S p h i n x "
C O M M E N T " B u i l d i n g do c u m e n t a t i o n w i t h S p h i n x "
)
add_custom_target ( dfhack_docs ALL
@ -493,6 +503,8 @@ if(BUILD_DOCS)
install ( DIRECTORY ${ dfhack_SOURCE_DIR } /docs/html/
D E S T I N A T I O N $ { D F H A C K _ U S E R D O C _ D E S T I N A T I O N } / d o c s )
install ( DIRECTORY ${ dfhack_SOURCE_DIR } /docs/text/
D E S T I N A T I O N $ { D F H A C K _ U S E R D O C _ D E S T I N A T I O N } / d o c s )
install ( FILES docs/_auto/news.rst docs/_auto/news-dev.rst DESTINATION ${ DFHACK_USERDOC_DESTINATION } )
install ( FILES "README.html" DESTINATION "${DFHACK_DATA_DESTINATION}" )
endif ( )