Dennis:
ACGDoxygen Version ID git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@171 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -21,6 +21,7 @@ endif ()
|
|||||||
add_subdirectory (src/OpenMesh/Core)
|
add_subdirectory (src/OpenMesh/Core)
|
||||||
add_subdirectory (src/OpenMesh/Tools)
|
add_subdirectory (src/OpenMesh/Tools)
|
||||||
add_subdirectory (src/OpenMesh/Apps)
|
add_subdirectory (src/OpenMesh/Apps)
|
||||||
|
add_subdirectory (Doc)
|
||||||
|
|
||||||
# display results
|
# display results
|
||||||
acg_print_configure_header ("OpenMesh")
|
acg_print_configure_header (OPENMESH "OpenMesh")
|
||||||
|
|||||||
5
Doc/CMakeLists.txt
Normal file
5
Doc/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
include (ACGDoxygen)
|
||||||
|
|
||||||
|
if (TARGET doc)
|
||||||
|
acg_copy_after_build (doc "${CMAKE_CURRENT_SOURCE_DIR}/html" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html")
|
||||||
|
endif ()
|
||||||
1525
Doc/doxy.config.in
Normal file
1525
Doc/doxy.config.in
Normal file
File diff suppressed because it is too large
Load Diff
2
VERSION
2
VERSION
@@ -2,3 +2,5 @@ VERSION=2.0-RC3
|
|||||||
MAJOR=2
|
MAJOR=2
|
||||||
MINOR=0
|
MINOR=0
|
||||||
PATCH=0
|
PATCH=0
|
||||||
|
ID=OPENMESH
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,17 @@ endif ()
|
|||||||
|
|
||||||
# read version from file
|
# read version from file
|
||||||
macro (acg_get_version)
|
macro (acg_get_version)
|
||||||
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" _file)
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGN}/VERSION")
|
||||||
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/${ARGN}/VERSION" _file)
|
||||||
|
else ()
|
||||||
|
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" _file)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
string (
|
||||||
|
REGEX REPLACE
|
||||||
|
"^.*ID=([^\n]*).*$" "\\1"
|
||||||
|
_id ${_file}
|
||||||
|
)
|
||||||
string (
|
string (
|
||||||
REGEX REPLACE
|
REGEX REPLACE
|
||||||
"^.*VERSION=([^\n]*).*$" "\\1"
|
"^.*VERSION=([^\n]*).*$" "\\1"
|
||||||
@@ -47,10 +57,11 @@ macro (acg_get_version)
|
|||||||
"^.*PATCH=([^\n]*).*$" "\\1"
|
"^.*PATCH=([^\n]*).*$" "\\1"
|
||||||
_patch ${_file}
|
_patch ${_file}
|
||||||
)
|
)
|
||||||
set (VERSION ${_version})
|
|
||||||
set (VERSION_MAJOR ${_major})
|
set (${_id}_VERSION ${_version})
|
||||||
set (VERSION_MINOR ${_minor})
|
set (${_id}_VERSION_MAJOR ${_major})
|
||||||
set (VERSION_PATCH ${_patch})
|
set (${_id}_VERSION_MINOR ${_minor})
|
||||||
|
set (${_id}_VERSION_PATCH ${_patch})
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
|
|
||||||
@@ -75,6 +86,11 @@ if (COMMAND acg_modify_project_dirs)
|
|||||||
acg_modify_project_dirs ()
|
acg_modify_project_dirs ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR})
|
||||||
|
file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
# sets default build properties
|
# sets default build properties
|
||||||
macro (acg_set_target_props target)
|
macro (acg_set_target_props target)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|||||||
122
cmake/ACGDoxygen.cmake
Normal file
122
cmake/ACGDoxygen.cmake
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
# -helper macro to add a "doc" target with CMake build system.
|
||||||
|
# and configure doxy.config.in to doxy.config
|
||||||
|
#
|
||||||
|
# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Please note, that the tools, e.g.:
|
||||||
|
# doxygen, dot, latex, dvips, makeindex, gswin32, etc.
|
||||||
|
# must be in path.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
#
|
||||||
|
# author Jan Woetzel 2004-2006
|
||||||
|
# www.mip.informatik.uni-kiel.de/~jw
|
||||||
|
|
||||||
|
|
||||||
|
FIND_PACKAGE(Doxygen)
|
||||||
|
|
||||||
|
IF (DOXYGEN_FOUND)
|
||||||
|
|
||||||
|
# click+jump in Emacs and Visual Studio (for doxy.config) (jw)
|
||||||
|
IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
|
||||||
|
SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
|
||||||
|
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)
|
||||||
|
MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
|
||||||
|
ENDIF (NOT LATEX_COMPILER)
|
||||||
|
IF (NOT MAKEINDEX_COMPILER)
|
||||||
|
MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
|
||||||
|
ENDIF (NOT MAKEINDEX_COMPILER)
|
||||||
|
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}/doxy.config.in")
|
||||||
|
MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
|
||||||
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
|
||||||
|
@ONLY )
|
||||||
|
# use (configured) doxy.config from (out of place) BUILD tree:
|
||||||
|
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
|
||||||
|
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
|
||||||
|
# use static hand-edited doxy.config from SOURCE tree:
|
||||||
|
SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
|
||||||
|
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
|
||||||
|
MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
|
||||||
|
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
|
||||||
|
IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
|
||||||
|
# using template doxy.config.in
|
||||||
|
MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
|
||||||
|
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
|
||||||
|
@ONLY )
|
||||||
|
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
|
||||||
|
ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
|
||||||
|
# failed completely...
|
||||||
|
MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
|
||||||
|
ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
|
||||||
|
|
||||||
|
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
|
||||||
|
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
|
||||||
|
|
||||||
|
ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${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)
|
||||||
|
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 doc)
|
||||||
|
|
||||||
|
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
|
||||||
|
IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
|
||||||
|
IF (PROJECT_NAME)
|
||||||
|
SET(OUT "${PROJECT_NAME}")
|
||||||
|
ELSE (PROJECT_NAME)
|
||||||
|
SET(OUT "Documentation") # default
|
||||||
|
ENDIF(PROJECT_NAME)
|
||||||
|
IF (${PROJECT_NAME}_VERSION_MAJOR)
|
||||||
|
SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
|
||||||
|
IF (${PROJECT_NAME}_VERSION_MINOR)
|
||||||
|
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
|
||||||
|
IF (${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
|
||||||
|
INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
|
||||||
|
DESTINATION "doc"
|
||||||
|
RENAME "${OUT}"
|
||||||
|
)
|
||||||
|
ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
|
||||||
|
ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
|
||||||
|
|
||||||
|
ENDIF(HTML_HELP_COMPILER)
|
||||||
|
# MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
|
||||||
|
ENDIF (WIN32)
|
||||||
|
ENDIF(DOXYGEN_FOUND)
|
||||||
@@ -21,9 +21,9 @@ function (acg_color_message _str)
|
|||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
# info header
|
# info header
|
||||||
function (acg_print_configure_header _name)
|
function (acg_print_configure_header _id _name)
|
||||||
acg_format_string ("${_name}" 40 _project)
|
acg_format_string ("${_name}" 40 _project)
|
||||||
acg_format_string ("${VERSION}" 40 _version)
|
acg_format_string ("${${_id}_VERSION}" 40 _version)
|
||||||
acg_color_message ("\n${_escape}[40;37m************************************************************${_escape}[0m")
|
acg_color_message ("\n${_escape}[40;37m************************************************************${_escape}[0m")
|
||||||
acg_color_message ("${_escape}[40;37m* ${_escape}[1;31mACG ${_escape}[0;40;34mBuildsystem${_escape}[0m${_escape}[40;37m *${_escape}[0m")
|
acg_color_message ("${_escape}[40;37m* ${_escape}[1;31mACG ${_escape}[0;40;34mBuildsystem${_escape}[0m${_escape}[40;37m *${_escape}[0m")
|
||||||
acg_color_message ("${_escape}[40;37m* *${_escape}[0m")
|
acg_color_message ("${_escape}[40;37m* *${_escape}[0m")
|
||||||
|
|||||||
Reference in New Issue
Block a user