mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
[cmake] support prebuilt documentation in out-of-tree builds
This commit is contained in:
parent
46e9bf86b8
commit
0f59e42802
1 changed files with 11 additions and 0 deletions
|
@ -136,4 +136,15 @@ IF(BUILD_DOCS)
|
||||||
# Group docs targets into a DocsTargets folder
|
# Group docs targets into a DocsTargets folder
|
||||||
SET_PROPERTY(TARGET doc BUILD_MANUALS build_lexicon_filter
|
SET_PROPERTY(TARGET doc BUILD_MANUALS build_lexicon_filter
|
||||||
PROPERTY FOLDER cmake/DocTargets)
|
PROPERTY FOLDER cmake/DocTargets)
|
||||||
|
ELSEIF(HAVE_PREBUILT_DOCS)
|
||||||
|
IF(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||||
|
# Out of tree build - link the prebuilt documentation to the build tree
|
||||||
|
ADD_CUSTOM_TARGET(link_doc ALL)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET link_doc
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/share/man ${CMAKE_CURRENT_BINARY_DIR}/share/man
|
||||||
|
POST_BUILD)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET link_doc
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/user_doc ${CMAKE_CURRENT_BINARY_DIR}/user_doc
|
||||||
|
POST_BUILD)
|
||||||
|
ENDIF()
|
||||||
ENDIF(BUILD_DOCS)
|
ENDIF(BUILD_DOCS)
|
||||||
|
|
Loading…
Reference in a new issue