fix build system (TargetDoc.cmake)
This commit is contained in:
parent
5b768161cd
commit
344a7a7890
1 changed files with 28 additions and 28 deletions
|
@ -1,8 +1,8 @@
|
|||
# -helper macro to add a "doxy" target with CMake build system.
|
||||
# -helper macro to add a "doxy" target with CMake build system.
|
||||
# and configure Doxyfile.in to Doxyfile
|
||||
#
|
||||
# target "doxy" allows building the documentation with doxygen/dot on WIN32 and Linux
|
||||
# Creates .chm windows help file if MS HTML help workshop
|
||||
# Creates .chm windows help file if MS HTML help workshop
|
||||
# (available from http://msdn.microsoft.com/workshop/author/htmlhelp)
|
||||
# is installed with its DLLs in PATH.
|
||||
#
|
||||
|
@ -11,7 +11,7 @@
|
|||
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
|
||||
# must be in path.
|
||||
#
|
||||
# Note about Visual Studio Projects:
|
||||
# Note about Visual Studio Projects:
|
||||
# MSVS hast its own path environment which may differ from the shell.
|
||||
# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1
|
||||
#
|
||||
|
@ -30,7 +30,7 @@ IF (DOXYGEN)
|
|||
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
|
||||
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
|
||||
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
|
||||
|
||||
|
||||
# we need latex for doxygen because of the formulas
|
||||
FIND_PACKAGE(LATEX)
|
||||
IF (NOT LATEX_COMPILER)
|
||||
|
@ -42,54 +42,54 @@ IF (DOXYGEN)
|
|||
IF (NOT DVIPS_CONVERTER)
|
||||
MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
|
||||
ENDIF (NOT DVIPS_CONVERTER)
|
||||
|
||||
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in")
|
||||
MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in --> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
|
||||
|
||||
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in")
|
||||
MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in --> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
@ONLY )
|
||||
# use (configured) Doxyfile from (out of place) BUILD tree:
|
||||
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in")
|
||||
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in")
|
||||
# use static hand-edited Doxyfile from SOURCE tree:
|
||||
SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
|
||||
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
|
||||
MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile instead of configuring from Doxyfile.in file.")
|
||||
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
|
||||
SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile")
|
||||
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile")
|
||||
MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile instead of configuring from Doxyfile.in file.")
|
||||
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile")
|
||||
IF (EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in")
|
||||
# using template Doxyfile.in
|
||||
MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/Doxyfile.in --> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/Doxyfile.in
|
||||
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/Doxyfile.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
@ONLY )
|
||||
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
ELSE (EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in")
|
||||
# failed completely...
|
||||
MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in (or Doxyfile as fallback)")
|
||||
MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in (or Doxyfile as fallback)")
|
||||
ENDIF(EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in")
|
||||
|
||||
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile")
|
||||
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in")
|
||||
|
||||
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile")
|
||||
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build/Doxyfile.in")
|
||||
|
||||
ADD_CUSTOM_TARGET(doxy ${DOXYGEN} ${DOXY_CONFIG})
|
||||
|
||||
|
||||
# create a windows help .chm file using hhc.exe
|
||||
# HTMLHelp DLL must be in path!
|
||||
# fallback: use hhw.exe interactively
|
||||
IF (WIN32)
|
||||
FIND_PACKAGE(HTMLHelp)
|
||||
IF (HTML_HELP_COMPILER)
|
||||
IF (HTML_HELP_COMPILER)
|
||||
SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
|
||||
STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
|
||||
# MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
|
||||
ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
|
||||
ADD_DEPENDENCIES (winhelp doxy)
|
||||
|
||||
|
||||
IF (NOT TARGET_DOC_SKIP_INSTALL)
|
||||
# install windows help?
|
||||
# determine useful name for output file
|
||||
# should be project and version unique to allow installing
|
||||
# multiple projects into one global directory
|
||||
# determine useful name for output file
|
||||
# should be project and version unique to allow installing
|
||||
# multiple projects into one global directory
|
||||
IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
|
||||
IF (PROJECT_NAME)
|
||||
SET(OUT "${PROJECT_NAME}")
|
||||
|
@ -101,15 +101,15 @@ IF (DOXYGEN)
|
|||
IF (${PROJECT_NAME}_VERSION_MINOR)
|
||||
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
|
||||
IF (${PROJECT_NAME}_VERSION_PATCH)
|
||||
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
|
||||
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
|
||||
ENDIF(${PROJECT_NAME}_VERSION_PATCH)
|
||||
ENDIF(${PROJECT_NAME}_VERSION_MINOR)
|
||||
ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
|
||||
# keep suffix
|
||||
SET(OUT "${OUT}.chm")
|
||||
|
||||
|
||||
#MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}")
|
||||
# create target used by install and package commands
|
||||
# create target used by install and package commands
|
||||
INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
|
||||
DESTINATION "doxy"
|
||||
RENAME "${OUT}"
|
||||
|
@ -119,7 +119,7 @@ IF (DOXYGEN)
|
|||
|
||||
ENDIF(HTML_HELP_COMPILER)
|
||||
# MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
|
||||
ENDIF (WIN32)
|
||||
ENDIF (WIN32)
|
||||
ELSE(DOXYGEN)
|
||||
MESSAGE("Doxygen not found")
|
||||
ENDIF(DOXYGEN)
|
||||
|
|
Loading…
Reference in a new issue