forked from open-iscsi/target-isns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (23 loc) · 858 Bytes
/
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
#
# (C) Copyright 2013
# Christophe Vu-Brugier <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0+
#
project(target-isns "C")
set(TARGET_ISNS_VERSION "0.6.7")
cmake_minimum_required(VERSION 3.1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
option(SUPPORT_SYSTEMD "Support service control via systemd" OFF)
add_subdirectory(src)
install(FILES target-isns.conf DESTINATION /etc/)
install(FILES target-isns.8 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man8/)
if (SUPPORT_SYSTEMD)
install(FILES target-isns.service DESTINATION /usr/lib/systemd/system/)
endif (SUPPORT_SYSTEMD)
add_subdirectory(tests)
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${TARGET_ISNS_VERSION})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| xz > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})