Changeset 26 in pacpusframework for trunk


Ignore:
Timestamp:
Jan 8, 2013, 5:00:30 PM (12 years ago)
Author:
sgosseli
Message:

Add the generation of the documentation in the build system.
To build the documentation on Windows:

cmake .. -DPACPUS_INSTALL_DIR=C:\Foo -DPACPUS_BUILD_DOC=TRUE
msbuild doc\documentation.vcxproj
msbuild INSTALL.vcxproj /p:Configuration=Release

Note: doxygen is required, of course.

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r7 r26  
    2626set(PACPUS_3RD_PARTY_DIR    ${PACPUS_ROOT_DIR}/3rd)
    2727set(PACPUS_CMAKE_DIR        ${PACPUS_ROOT_DIR}/cmake)
     28set(PACPUS_DOC_DIR          ${PACPUS_ROOT_DIR}/doc)
    2829set(PACPUS_INCLUDE_DIR      ${PACPUS_ROOT_DIR}/include/Pacpus)
    2930set(PACPUS_SCRIPTS_DIR      ${PACPUS_ROOT_DIR}/scripts)
     
    7172
    7273# ========================================
     74# Build the documentation if enabled
     75# ========================================
     76if (PACPUS_BUILD_DOC)
     77  add_subdirectory(${PACPUS_DOC_DIR})
     78endif()
     79
     80# ========================================
    7381# Pacpus Installation
    7482# ========================================
     
    108116pacpus_info("    Logging enabled:" ${PACPUS_USE_LOG})
    109117pacpus_info("    Installation of 3rd party:" ${PACPUS_INSTALL_3RD})
     118pacpus_info("    Documentation enabled:" ${PACPUS_BUILD_DOC})
    110119pacpus_info("")
    111120if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
  • trunk/cmake/PacpusConfiguration.cmake

    r3 r26  
    2121set(PACPUS_USE_LOG      TRUE  CACHE BOOL "Logging using log4cxx, the library is required")
    2222set(PACPUS_INSTALL_3RD  FALSE CACHE BOOL "Installation of the 3rd party")
     23set(PACPUS_BUILD_DOC    FALSE CACHE BOOL "Whether build the documentation (require Doxygen)")
  • trunk/cmake/PacpusDependencies.cmake

    r7 r26  
    4545  endif()
    4646endif()
     47
     48# ========================================
     49# Doxygen
     50# ========================================
     51if (PACPUS_BUILD_DOC)
     52  find_package(Doxygen)
     53  if (NOT DOXYGEN_FOUND)
     54    message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly")
     55  endif()
     56endif()
  • trunk/cmake/PacpusInstall.cmake

    r7 r26  
    3939  )
    4040endif()
     41
     42# ========================================
     43# Installation of the documentation
     44# ========================================
     45if (PACPUS_BUILD_DOC)
     46  install(
     47    DIRECTORY
     48      ${CMAKE_BINARY_DIR}/doc/html
     49    DESTINATION
     50      ${PACPUS_INSTALL_DIR}/doc
     51  )
     52endif()
Note: See TracChangeset for help on using the changeset viewer.