forked from assimp/assimp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable doxygen been properly used from cmake build and install.
Current documentation lacks a proper directory handling and switch for Unix like systems. The option BUILD_DOCS are added as disable by default, even so the Doxyfile file is generated for a manual build. Option HTML_OUTPUT are made cached to be properly replaced, as usually done by some Linux distributions Microsoft CHM option is enabled if MSVC is detected.
- Loading branch information
1 parent
c1d1dfa
commit e4f0506
Showing
3 changed files
with
68 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Only test for Doxygent if BUILD_DOCS are ON | ||
# We will configure Doxygen output anyway in case | ||
# of manual generation | ||
if( BUILD_DOCS ) | ||
find_package( Doxygen REQUIRED ) | ||
endif( BUILD_DOCS ) | ||
|
||
set( HTML_OUTPUT "AssimpDoc_Html" CACHE STRING "Output directory for generated HTML documentation. Defaults to AssimpDoc_Html." ) | ||
|
||
# Enable Microsoft CHM help style only on Windows | ||
set( MICROSOFT_HELP_WORKSHOP "NO") | ||
if( MSVC ) | ||
set( MICROSOFT_HELP_WORKSHOP "YES" ) | ||
endif( MSVC ) | ||
|
||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in | ||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile | ||
@ONLY | ||
) | ||
|
||
add_custom_target( | ||
docs ALL | ||
DEPENDS docs.done | ||
) | ||
|
||
add_custom_command( | ||
OUTPUT docs.done | ||
COMMAND ${DOXYGEN_EXECUTABLE} | ||
COMMAND ${CMAKE_COMMAND} -E touch docs.done | ||
COMMENT "Generating assimp documentation" | ||
VERBATIM | ||
) | ||
|
||
if( DEFINED CMAKE_INSTALL_DOCDIR ) | ||
install( | ||
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${HTML_OUTPUT} | ||
DESTINATION ${CMAKE_INSTALL_DOCDIR}/assimp-${PROJECT_VERSION} | ||
) | ||
install(FILES | ||
${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.png | ||
${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.svg | ||
${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/dragonsplash.png | ||
DESTINATION ${CMAKE_INSTALL_DOCDIR}/assimp-${PROJECT_VERSION} | ||
) | ||
endif( DEFINED CMAKE_INSTALL_DOCDIR ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters