Add general target for generating API doc

This commit is contained in:
Martchus 2017-04-04 01:00:17 +02:00
parent 663b31c5fe
commit cb82630665
2 changed files with 6 additions and 3 deletions

View File

@ -45,7 +45,7 @@ cd "path/to/build/directory"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/final/install/location" "path/to/projectdirectory" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/final/install/location" "path/to/projectdirectory"
make make
make check # build and run unit tests (optional) make check # build and run unit tests (optional)
make c++utilities_apidoc # build API documentation (optional) make apidoc # build API documentation (optional)
make DESTDIR="/temporary/install/location" install make DESTDIR="/temporary/install/location" install
``` ```

View File

@ -51,10 +51,14 @@ if(NOT NO_DOXYGEN)
) )
# add target for generating API documentation # add target for generating API documentation
add_custom_target(${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_apidoc add_custom_target("${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_apidoc"
COMMAND "${DOXYGEN_BIN}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.config" COMMAND "${DOXYGEN_BIN}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.config"
SOURCES ${DOXY_INPUT_FILES} SOURCES ${DOXY_INPUT_FILES}
) )
if(NOT TARGET apidoc)
add_custom_target(apidoc)
endif()
add_dependencies(apidoc "${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}_apidoc")
# add install target for API documentation # add install target for API documentation
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/api-doc" install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/api-doc"
@ -62,7 +66,6 @@ if(NOT NO_DOXYGEN)
COMPONENT api-doc COMPONENT api-doc
OPTIONAL OPTIONAL
) )
if(NOT TARGET install-api-doc) if(NOT TARGET install-api-doc)
add_custom_target(install-api-doc add_custom_target(install-api-doc
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=api-doc -P "${CMAKE_BINARY_DIR}/cmake_install.cmake" COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=api-doc -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"