-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
58 lines (47 loc) · 2.03 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.2)
project(uwb-apps)
set (${PROJECT_NAME}_VERSION_MAJOR ${VERSION_MAJOR})
set (${PROJECT_NAME}_VERSION_MINOR ${VERSION_MINOR})
set (${PROJECT_NAME}_VERSION_PATCH ${VERSION_PATCH})
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/../include/config.h"
)
set(CMAKE_BUILD_TYPE ${BUILD_TYPE})
add_subdirectory(apps/twr_nranges_tdma)
option(BUILD_DOC "Build documentation" ON)
if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease")
find_package(Doxygen)
if(DOXYGEN_FOUND)
option(BUILD_DOC "Build documentation" ON)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/doxy/Doxyfile-dw1000.conf)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM )
endif()
endif()
# build a CPack driven installer package
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set (CPACK_PACKAGE_VERSION_MAJOR "${${PROJECT_NAME}_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${${PROJECT_NAME}_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${${PROJECT_NAME}_VERSION_PATCH}")
set (CPACK_COMPONENTS_ALL applications libraries headers)
set (CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "Decawave Porting Layer")
set (CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Static libraries used to build programs with example")
set (CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files for use with template")
set (CPACK_COMPONENT_DOCS_DISPLAY_NAME "C++ API Documentation")
set (CPACK_COMPONENT_DOCS_DESCRIPTION "C++ API HTML files describing the API for Interface")
find_package(Doxygen)
if(DOXYGEN_FOUND)
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/html DESTINATION ./)
endif()
include (CPack)
include(CTest)
# does the application run
add_test (TutorialRuns Tutorial 25)