Changeset 1769 in CLRX


Ignore:
Timestamp:
Dec 1, 2015, 4:14:37 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: Make dependencies for the documentation building and add a documentation building to main target.

Location:
CLRadeonExtender/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/CMakeLists.txt

    r665 r1769  
    2424
    2525INSTALL(FILES ${PROJECT_BINARY_DIR}/CLRX/Config.h DESTINATION include/CLRX)
     26
     27IF(BUILD_DOXYGEN)
     28  FIND_PACKAGE(Doxygen)
     29  IF(DOXYGEN_FOUND)
     30      FILE(GLOB_RECURSE CLRX_HEADERS ${PROJECT_SOURCE_DIR}/CLRX/*)
     31      #-- Configure the Template Doxyfile for our specific project
     32      CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile
     33                  @ONLY IMMEDIATE)
     34      ADD_CUSTOM_TARGET(Docs ALL DEPENDS ${PROJECT_BINARY_DIR}/doc/doxygen.stamp)
     35      #-- Add a custom target to run Doxygen when ever the project is built
     36      ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/doc/doxygen.stamp
     37            COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
     38            COMMAND cmake -E touch ${PROJECT_BINARY_DIR}/doc/doxygen.stamp
     39            DEPENDS ${PROJECT_BINARY_DIR}/Doxyfile ${CLRX_HEADERS})
     40      # IF you do NOT want the documentation to be generated EVERY time you build the project
     41      # then leave out the 'ALL' keyword from the above command.
     42      INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/ DESTINATION share/doc/CLRX/doxygen)
     43  ELSE(DOXYGEN_FOUND)
     44    MESSAGE(WARNING
     45      "Doxygen documentation will not be built, because no correct Doxygen installation")
     46  ENDIF(DOXYGEN_FOUND)
     47ENDIF(BUILD_DOXYGEN)
     48
  • CLRadeonExtender/trunk/CMakeLists.txt

    r1683 r1769  
    134134ENDIF(BUILD_DOCUMENTATION)
    135135
    136 IF(BUILD_DOXYGEN)
    137   FIND_PACKAGE(Doxygen)
    138   IF(NOT DOXYGEN_FOUND)
    139     MESSAGE(FATAL_ERROR
    140       "Doxygen is needed to build the documentation. Please install it correctly")
    141   ENDIF(NOT DOXYGEN_FOUND)
    142   #-- Configure the Template Doxyfile for our specific project
    143   CONFIGURE_FILE(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile  @ONLY IMMEDIATE)
    144   #-- Add a custom target to run Doxygen when ever the project is built
    145   ADD_CUSTOM_TARGET(Docs COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
    146         SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
    147   # IF you do NOT want the documentation to be generated EVERY time you build the project
    148   # then leave out the 'ALL' keyword from the above command.
    149   INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/ DESTINATION share/doc/CLRX/doxygen)
    150 ENDIF(BUILD_DOXYGEN)
    151 
    152 IF(BUILD_CLRXDOC)
    153   FIND_PROGRAM(MARKDOWN_PY markdown_py)
    154   IF(NOT MARKDOWN_PY)
    155     MESSAGE(FATAL_ERROR "markdown_py is needed to build CLRX documentation")
    156   ENDIF(NOT MARKDOWN_PY)
    157   ADD_CUSTOM_TARGET(CLRXDocs ALL COMMAND sh ${PROJECT_SOURCE_DIR}/doc/genclrxdoc.sh
    158           ${PROJECT_SOURCE_DIR}/doc ${PROJECT_BINARY_DIR}/clrxdoc)
    159   INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/clrxdoc/ DESTINATION share/doc/CLRX/clrx)
    160 ENDIF(BUILD_CLRXDOC)
     136####
     137# rules to build doxygen and clrx doc is in proper CMakeLists.txt files in subdirectories
     138####
    161139
    162140IF(BUILD_MANUAL)
     
    285263    ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/samples)
    286264ENDIF(BUILD_SAMPLES)
     265
     266ADD_SUBDIRECTORY(${PROJECT_SOURCE_DIR}/doc)
  • CLRadeonExtender/trunk/doc/CMakeLists.txt

    r1623 r1769  
    2020CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
    2121
     22IF(BUILD_CLRXDOC)
     23  FIND_PROGRAM(MARKDOWN_PY markdown_py)
     24  IF(MARKDOWN_PY)
     25      FILE(GLOB CLRXDOCS_SOURCES ${PROJECT_SOURCE_DIR}/doc/*.md)
     26      ADD_CUSTOM_TARGET(CLRXDocs ALL DEPENDS ${PROJECT_BINARY_DIR}/clrxdoc/doc.stamp)
     27      ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/clrxdoc/doc.stamp
     28              COMMAND sh ${PROJECT_SOURCE_DIR}/doc/genclrxdoc.sh
     29              ${PROJECT_SOURCE_DIR}/doc ${PROJECT_BINARY_DIR}/clrxdoc
     30              COMMAND cmake -E touch ${PROJECT_BINARY_DIR}/clrxdoc/doc.stamp
     31              DEPENDS ${CLRXDOCS_SOURCES})
     32      INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/clrxdoc/ DESTINATION share/doc/CLRX/clrx
     33              FILES_MATCHING PATTERN "*.html" PATTERN "*.css")
     34  ELSE(MARKDOWN_PY)
     35    MESSAGE(WARNING "CLRX Documentation will not be built, because no markdown_py utility")
     36  ENDIF(MARKDOWN_PY)
     37ENDIF(BUILD_CLRXDOC)
Note: See TracChangeset for help on using the changeset viewer.