0027022: Configuration, CMake - rename ungrouped variables to include them to the...
[occt.git] / adm / cmake / doxygen.cmake
1 # doxygen
2
3 set (3RDPARTY_DOT_EXECUTABLE_DESCR       "The path to the 'dot' tool producing layered drawings of directed graphs.\nThis tool used by doxygen")
4 set (3RDPARTY_DOXYGEN_EXECUTABLE_DESCR   "The path to the doxygen command")
5
6 if (NOT DEFINED 3RDPARTY_DOXYGEN_EXECUTABLE)
7   set (3RDPARTY_DOXYGEN_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}")
8 endif()
9
10 if (NOT DEFINED 3RDPARTY_DOT_EXECUTABLE)
11   set (3RDPARTY_DOT_EXECUTABLE "" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}")
12 endif()
13
14 if (NOT DEFINED 3RDPARTY_SKIP_DOT_EXECUTABLE)
15   set (3RDPARTY_SKIP_DOT_EXECUTABLE OFF CACHE BOOL "Skip trying to find Dot")
16 endif()
17
18 if (3RDPARTY_SKIP_DOT_EXECUTABLE)
19   OCCT_CHECK_AND_UNSET (3RDPARTY_DOT_EXECUTABLE)
20 endif()
21
22 if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
23
24   set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
25   find_package (Doxygen)
26   
27   if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
28     set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)
29   endif()
30   
31   if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE AND DOXYGEN_DOT_EXECUTABLE)
32     set (3RDPARTY_DOT_EXECUTABLE "${DOXYGEN_DOT_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOT_EXECUTABLE_DESCR}" FORCE)
33   endif()
34 endif()
35
36 if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOXYGEN_EXECUTABLE}")
37   list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOXYGEN_EXECUTABLE)
38 endif()
39
40 if (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE)
41   if (NOT 3RDPARTY_DOT_EXECUTABLE OR NOT EXISTS "${3RDPARTY_DOT_EXECUTABLE}")
42     list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DOT_EXECUTABLE)
43   endif()
44 endif()
45
46 # unset all redundant variables
47 OCCT_CHECK_AND_UNSET (DOXYGEN_SKIP_DOT)
48 OCCT_CHECK_AND_UNSET (DOXYGEN_EXECUTABLE)
49 OCCT_CHECK_AND_UNSET (DOXYGEN_DOT_EXECUTABLE)