Sun, 29 Dec 2019 13:39:36 +0100
adds CHANGELOG
universe@377 | 1 | cmake_minimum_required(VERSION 3.10) |
universe@375 | 2 | project(ucx VERSION 2.1 DESCRIPTION "UAP Common Extensions") |
universe@372 | 3 | |
universe@375 | 4 | # Configuration |
universe@375 | 5 | set(CMAKE_C_STANDARD 11) |
universe@375 | 6 | set(CMAKE_C_STANDARD_REQUIRED 99) |
universe@372 | 7 | |
universe@375 | 8 | # Library |
universe@375 | 9 | add_subdirectory(src) |
universe@372 | 10 | |
universe@375 | 11 | # Tests |
universe@375 | 12 | enable_testing() |
universe@375 | 13 | add_subdirectory(test) |
universe@375 | 14 | add_test(NAME test COMMAND ucxtest WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test") |
universe@372 | 15 | |
universe@372 | 16 | # Web Documentation |
universe@372 | 17 | add_subdirectory(docs/src) |
universe@372 | 18 | |
universe@372 | 19 | # API Documentation |
universe@372 | 20 | find_package(Doxygen) |
universe@372 | 21 | option(BUILD_DOCUMENTATION "Create API documentation." ${DOXYGEN_FOUND}) |
universe@372 | 22 | |
universe@372 | 23 | if(BUILD_DOCUMENTATION) |
universe@372 | 24 | if(NOT DOXYGEN_FOUND) |
universe@372 | 25 | message(FATAL_ERROR "Doxygen is needed to build the documentation.") |
universe@372 | 26 | endif() |
universe@372 | 27 | |
universe@372 | 28 | set(DOXY_INPUT ${CMAKE_SOURCE_DIR}/src) |
universe@372 | 29 | set(DOXY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/docs) |
universe@372 | 30 | set(DOXY_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/uaplogo.png) |
universe@372 | 31 | |
universe@372 | 32 | configure_file(${CMAKE_SOURCE_DIR}/cmake_infile.doxygen ${CMAKE_BINARY_DIR}/Doxyfile) |
universe@372 | 33 | |
universe@372 | 34 | add_custom_target(docs-api |
universe@372 | 35 | COMMAND ${DOXYGEN_EXECUTABLE} |
universe@372 | 36 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
universe@372 | 37 | COMMENT "Generating API documentation with Doxygen") |
universe@372 | 38 | endif() |
universe@372 | 39 | |
universe@372 | 40 | add_custom_target(docs-all DEPENDS docs-html docs-api) |