-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
45 lines (35 loc) · 1.18 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
cmake_minimum_required(VERSION 3.0)
project(ihs_boost VERSION 1.8.3)
# options
option(build_tests "build_tests" OFF)
option(with_documentation "with_documentation" OFF)
option(build_debian "build_debian" OFF)
# add modules
add_subdirectory(modules)
# tests for ctest
if (${build_tests})
include(CTest)
add_subdirectory(tests)
endif()
# doxygen/documentation
if (${with_documentation})
find_package(Doxygen REQUIRED)
# include the extra files
set(DOXYGEN_SOURCES ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/modules/)
set(DOXYGEN_EXAMPLE_PATH ${CMAKE_SOURCE_DIR}/examples)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/README.md)
# doxygen it
doxygen_add_docs(doxygen ${DOXYGEN_SOURCES} ALL)
endif()
# debian package
if(${build_debian})
# generate debian package
set(CPACK_GENERATOR "DEB")
# set debian variables
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Eliot")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libjsoncpp-dev, libbluetooth-dev")
# install on target machine to the provided install path
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
# include CPack to use these variables
include(CPack)
endif()