-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (27 loc) · 1.23 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
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
option(MEASURECMD_BUILD_DEB "Build debian package" ON)
option(MEASURECMD_ONLY_DOCS "Build only documentation -- this disables tests and others" OFF)
project(measurecmd VERSION 0.0.1 LANGUAGES CXX)
if (NOT MEASURECMD_ONLY_DOCS)
add_subdirectory(src)
endif()
##########################################################################################
# Debian Package
##########################################################################################
# Debian Packaging only available if this is the main app
if(NOT MEASURECMD_ONLY_DOCS AND (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) AND MEASURECMD_BUILD_DEB)
install(TARGETS measurecmd RUNTIME DESTINATION bin COMPONENT command)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_NAME "measure")
SET(CPACK_SET_DESTDIR TRUE)
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "not-set")
SET(CPACK_PACKAGE_VERSION "0.0.1rc")
include(GNUInstallDirs)
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "TODO")
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "")
SET(CPACK_PACKAGE_VENDOR "")
include(CPack)
cpack_add_component(command)
endif()