BUG: fix for 0008378, lists with FILEPATH and UNC //server/path fail
[cmake.git] / Utilities / CMakeLists.txt
blob5d75422b49caa03d76728358061c21c639ec4825
1 SUBDIRS(Doxygen KWStyle)
3 MAKE_DIRECTORY(${CMake_BINARY_DIR}/Docs)
5 # Add a documentation target.
6 SET(DOC_FILES "")
8 MACRO(ADD_DOCS target dependency)
9   # Generate documentation for "ctest" executable.
10   GET_TARGET_PROPERTY(CMD ${target} LOCATION)
11   # only generate the documentation if the target is actually built
12   IF(CMD)
13     ADD_CUSTOM_COMMAND(
14       OUTPUT ${CMake_BINARY_DIR}/Docs/${target}.txt
15       COMMAND ${CMD}
16       ARGS --help-full ${CMake_BINARY_DIR}/Docs/${target}.txt
17            --help-full ${CMake_BINARY_DIR}/Docs/${target}.html
18            --help-full ${CMake_BINARY_DIR}/Docs/${target}.1
19            --help-full ${CMake_BINARY_DIR}/Docs/${target}.docbook
20       DEPENDS ${target}
21       MAIN_DEPENDENCY ${dependency}
22       )
23     INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
24     INSTALL_FILES(${CMAKE_DOC_DIR} FILES
25       ${CMake_BINARY_DIR}/Docs/${target}.txt
26       ${CMake_BINARY_DIR}/Docs/${target}.html
27       ${CMake_BINARY_DIR}/Docs/${target}.docbook
28       )
29     SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
30   ENDIF(CMD)
31 ENDMACRO(ADD_DOCS target dependency)
33 # add the docs for the executables
34 ADD_DOCS(ctest      ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)
35 ADD_DOCS(cpack      ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)
36 ADD_DOCS(ccmake     ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt)
37 ADD_DOCS(CMakeSetup ${CMake_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in)
39 # add the documentation for cmake itself
41 GET_TARGET_PROPERTY(CMD cmake LOCATION)
42 ADD_CUSTOM_COMMAND(
43   OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt
44   COMMAND ${CMD} 
45   ARGS --copyright ${CMake_BINARY_DIR}/Docs/Copyright.txt
46        --help-full ${CMake_BINARY_DIR}/Docs/cmake.txt
47        --help-full ${CMake_BINARY_DIR}/Docs/cmake.html
48        --help-full ${CMake_BINARY_DIR}/Docs/cmake.1
49        --help-full ${CMake_BINARY_DIR}/Docs/cmake.docbook
50        --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
51        --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.html
52        --help-policies ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
53        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
54        --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.html
55        --help-properties ${CMake_BINARY_DIR}/Docs/cmakeprops.1
56        --help-variables ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
57        --help-variables ${CMake_BINARY_DIR}/Docs/cmake-variables.html
58        --help-variables ${CMake_BINARY_DIR}/Docs/cmakevars.1
59        --help-modules ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
60        --help-modules ${CMake_BINARY_DIR}/Docs/cmake-modules.html
61        --help-modules ${CMake_BINARY_DIR}/Docs/cmakemodules.1
62        --help-commands ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
63        --help-commands ${CMake_BINARY_DIR}/Docs/cmake-commands.html
64        --help-commands ${CMake_BINARY_DIR}/Docs/cmakecommands.1
65        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
66        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
67        --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmakecompat.1
68   DEPENDS cmake
69   MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
70   )
72 INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES
73               ${CMake_BINARY_DIR}/Docs/cmake.1
74               ${CMake_BINARY_DIR}/Docs/cmakecommands.1
75               ${CMake_BINARY_DIR}/Docs/cmakecompat.1
76               ${CMake_BINARY_DIR}/Docs/cmakeprops.1
77               ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
78               ${CMake_BINARY_DIR}/Docs/cmakevars.1
79               ${CMake_BINARY_DIR}/Docs/cmakemodules.1)
81 INSTALL_FILES(${CMAKE_DOC_DIR} FILES
82     ${CMake_BINARY_DIR}/Docs/cmake.txt
83     ${CMake_BINARY_DIR}/Docs/cmake.html
84     ${CMake_BINARY_DIR}/Docs/cmake.docbook
85     ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
86     ${CMake_BINARY_DIR}/Docs/cmake-policies.html
87     ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
88     ${CMake_BINARY_DIR}/Docs/cmake-properties.html
89     ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
90     ${CMake_BINARY_DIR}/Docs/cmake-variables.html 
91     ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
92     ${CMake_BINARY_DIR}/Docs/cmake-modules.html
93     ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
94     ${CMake_BINARY_DIR}/Docs/cmake-commands.html
95     ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
96     ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html )
98 # Drive documentation generation.
99 ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt )