]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/CMakehltdoc.conf
Corrected list of libraries to resolve all symbols
[u/mrichter/AliRoot.git] / HLT / CMakehltdoc.conf
1 # -*- mode: cmake -*-
2 # $Id$
3
4
5 option(HLT_DOC "Create and install the HLT API documentation (requires Doxygen)" OFF)
6
7 IF(HLT_DOC)
8   FIND_PACKAGE(Doxygen)
9   IF(NOT DOXYGEN_FOUND)
10     MESSAGE(FATAL_ERROR
11       "Doxygen is needed to build the documentation.")
12   ENDIF()
13
14   SET(HLT_doxy_depend doc/mainpage.c)
15   SET(HLT_doxy_input)
16   SET(HLT_doxy_source_paths 
17     doc
18     BASE
19     SampleLib
20     rec
21     exa
22     shuttle
23     sim
24     global
25     trigger
26     TPCLib
27     MUON
28     )
29
30   SET(HLT_doxy_source_exclude_paths ${CMAKE_CURRENT_SOURCE_DIR}/TPCLib/tracking-ca/cagpu)
31
32   FOREACH(mypath ${HLT_doxy_source_paths})
33     SET(HLT_doxy_input "${HLT_doxy_input} ${CMAKE_CURRENT_SOURCE_DIR}/${mypath}")
34     FILE(GLOB_RECURSE tmpvar ${mypath}/*.[h,c,cxx,C])
35     SET(HLT_doxy_depend ${HLT_doxy_depend} ${tmpvar})
36   ENDFOREACH(mypath ${HLT_doxy_source_paths})
37
38   SET( HLT_doxyfile_in          ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.conf.in )
39   SET( HLT_doxy_image_path      ${CMAKE_CURRENT_SOURCE_DIR}/doc/pics            ) 
40   SET( HLT_doxyfile             ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile            )
41   SET( HLT_doxy_html_index_file ${CMAKE_CURRENT_BINARY_DIR}/html/index.html     )
42   SET( HLT_doxy_output_root     ${CMAKE_CURRENT_BINARY_DIR}                     )
43  
44   CONFIGURE_FILE( ${HLT_doxyfile_in} ${HLT_doxyfile} @ONLY )
45  
46   ADD_CUSTOM_COMMAND( OUTPUT ${HLT_doxy_html_index_file}
47     COMMAND ${DOXYGEN_EXECUTABLE} ${HLT_doxyfile}
48     # The following should be ${doxyfile} only but it
49     # will break the dependency.
50     # The optimal solution would be creating a 
51     # custom_command for ${doxyfile} generation
52     # but I still have to figure out how...
53     MAIN_DEPENDENCY ${HLT_doxyfile} ${HLT_doxyfile_in}
54     DEPENDS ${HLT_doxy_depend}
55     COMMENT "Generating HLT HTML documentation")
56   
57   ADD_CUSTOM_TARGET( hltdoc DEPENDS ${HLT_doxy_html_index_file} )
58
59   #Have to create html dir, otherwise install fails if doc hasn't been build
60   FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html)
61
62   INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION doc/HLT )
63 ENDIF(HLT_DOC)