CMakeLists.txt

Sun, 26 Sep 2021 15:26:43 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 26 Sep 2021 15:26:43 +0200
changeset 428
da66264af8ad
parent 420
8eb6faa2edba
child 433
f1e4c6dabfb4
permissions
-rw-r--r--

fix special cases for linked_list_add

universe@390 1 cmake_minimum_required(VERSION 3.14)
universe@390 2 project(ucx VERSION 3.0 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@372 14
universe@372 15 # Web Documentation
universe@372 16 add_subdirectory(docs/src)
universe@372 17
universe@372 18 # API Documentation
universe@420 19 message(CHECK_START "Seaching for Doxygen")
universe@372 20 find_package(Doxygen)
universe@420 21 if(DOXYGEN_FOUND)
universe@420 22 message(CHECK_PASS "found.")
universe@420 23 else()
universe@420 24 message(CHECK_FAIL "not found - documentation will not be generated.")
universe@420 25 endif()
universe@420 26 option(BUILD_API_DOC "Create API documentation." ON)
universe@372 27
universe@420 28 if(BUILD_API_DOC AND DOXYGEN_FOUND)
universe@372 29 set(DOXY_INPUT ${CMAKE_SOURCE_DIR}/src)
universe@372 30 set(DOXY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/docs)
universe@372 31 set(DOXY_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/uaplogo.png)
universe@372 32
universe@372 33 configure_file(${CMAKE_SOURCE_DIR}/cmake_infile.doxygen ${CMAKE_BINARY_DIR}/Doxyfile)
universe@372 34
universe@390 35 add_custom_target(docs-api-21
universe@390 36 COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/docs/api-2.1 ${CMAKE_BINARY_DIR}/docs/web/api-2.1
universe@390 37 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
universe@390 38 COMMENT "Copying UCX 2.1 API documentation.")
universe@390 39
universe@372 40 add_custom_target(docs-api
universe@372 41 COMMAND ${DOXYGEN_EXECUTABLE}
universe@372 42 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
universe@390 43 COMMENT "Generating API documentation with Doxygen.")
universe@390 44
universe@390 45 add_custom_target(docs-all DEPENDS docs-html docs-api docs-api-21)
universe@390 46 else()
universe@390 47 add_custom_target(docs-all DEPENDS docs-html)
universe@372 48 endif()
universe@372 49

mercurial