statzone

DNS zone file analyzer targeted at TLD zones
Log | Files | Refs | README | LICENSE

CMakeLists.txt (1270B)


      1 #
      2 # StatZone 1.1.1
      3 # Copyright (c) 2012-2021, Frederic Cambus
      4 # https://www.statdns.com
      5 #
      6 # Created: 2012-02-13
      7 # Last Updated: 2021-10-18
      8 #
      9 # StatZone is released under the BSD 2-Clause license.
     10 # See LICENSE file for details.
     11 #
     12 # SPDX-License-Identifier: BSD-2-Clause
     13 #
     14 
     15 cmake_minimum_required(VERSION 3.1)
     16 
     17 set(CMAKE_CXX_STANDARD 11)
     18 set(CMAKE_CXX_STANDARD_REQUIRED ON)
     19 set(CMAKE_CXX_EXTENSIONS OFF)
     20 
     21 project(statzone CXX)
     22 
     23 include(CheckFunctionExists)
     24 include(GNUInstallDirs)
     25 
     26 # Conditional build options
     27 set(ENABLE_SECCOMP 0 CACHE BOOL "Enable building with seccomp")
     28 
     29 if(ENABLE_SECCOMP)
     30   # Check if system has seccomp
     31   message(STATUS "Looking for seccomp")
     32   find_path(SECCOMP NAMES "linux/seccomp.h")
     33   if(SECCOMP)
     34     message(STATUS "Looking for seccomp - found")
     35     add_definitions(-DHAVE_SECCOMP)
     36   else()
     37     message(STATUS "Looking for seccomp - not found")
     38   endif()
     39 endif(ENABLE_SECCOMP)
     40 
     41 set(SRC src/statzone.cpp src/strtolower.cpp)
     42 
     43 add_definitions(-Wall -Wextra -pedantic)
     44 add_executable(statzone ${SRC})
     45 
     46 install(TARGETS statzone DESTINATION ${CMAKE_INSTALL_BINDIR})
     47 install(FILES statzone.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
     48 
     49 enable_testing()
     50 add_test(statzone statzone)
     51 add_test(processing statzone ${PROJECT_SOURCE_DIR}/tests/arpa.zone)