-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
51 lines (41 loc) · 1.24 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
#
# StatZone 1.1.1
# Copyright (c) 2012-2023, Frederic Cambus
# https://www.statdns.com
#
# Created: 2012-02-13
# Last Updated: 2023-03-13
#
# StatZone is released under the BSD 2-Clause license.
# See LICENSE file for details.
#
# SPDX-License-Identifier: BSD-2-Clause
#
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(statzone CXX)
include(CheckFunctionExists)
include(GNUInstallDirs)
# Conditional build options
set(ENABLE_SECCOMP 0 CACHE BOOL "Enable building with seccomp")
if(ENABLE_SECCOMP)
# Check if system has seccomp
message(STATUS "Looking for seccomp")
find_path(SECCOMP NAMES "linux/seccomp.h")
if(SECCOMP)
message(STATUS "Looking for seccomp - found")
add_definitions(-DHAVE_SECCOMP)
else()
message(STATUS "Looking for seccomp - not found")
endif()
endif(ENABLE_SECCOMP)
set(SRC src/statzone.cpp src/strtolower.cpp)
add_definitions(-Wall -Wextra -pedantic)
add_executable(statzone ${SRC})
install(TARGETS statzone DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES man/statzone.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
enable_testing()
add_test(statzone statzone)
add_test(processing statzone ${PROJECT_SOURCE_DIR}/tests/arpa.zone)