~saviq/unity/phablet.release-172

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Michał Sawicz
  • Date: 2013-04-23 22:27:12 UTC
  • mfrom: (612.1.8 phablet)
  • Revision ID: michal.sawicz@canonical.com-20130423222712-6q65wyw0bcif013r
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
    DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
176
176
    )
177
177
 
 
178
#
 
179
# Documentation
 
180
#
 
181
 
 
182
find_package(Doxygen)
 
183
find_program(DOT_EXECUTABLE dot /usr/bin)
 
184
if (NOT DOXYGEN_FOUND OR NOT DOT_EXECUTABLE)
 
185
    message(WARNING "Cannot generate documentation: doxygen and/or graphviz not found")
 
186
else()
 
187
    configure_file(${PROJECT_SOURCE_DIR}/doc/Doxyfile.in ${PROJECT_BINARY_DIR}/doc/Doxyfile @ONLY IMMEDIATE)
 
188
    add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/doc/lib${UNITY_API_LIB}/index.html
 
189
                       COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doc/Doxyfile
 
190
                       DEPENDS ${PROJECT_BINARY_DIR}/doc/Doxyfile
 
191
                               ${UNITY_API_LIB_SRC}
 
192
                               ${UNITY_API_LIB_HDRS})
 
193
    add_custom_target(doc ALL
 
194
                       DEPENDS ${PROJECT_BINARY_DIR}/doc/lib${UNITY_API_LIB}/index.html)
 
195
    install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/lib${UNITY_API_LIB}
 
196
            DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc)
 
197
endif()