statzone

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

CMakeLists.txt (1190B)


      1 #
      2 # StatZone 1.1.0
      3 # Copyright (c) 2012-2021, Frederic Cambus
      4 # https://www.statdns.com
      5 #
      6 # Created: 2012-02-13
      7 # Last Updated: 2021-04-04
      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 2.8.12)
     16 
     17 project(statzone CXX)
     18 
     19 include(CheckFunctionExists)
     20 include(GNUInstallDirs)
     21 
     22 # Conditional build options
     23 set(ENABLE_SECCOMP 0 CACHE BOOL "Enable building with seccomp")
     24 
     25 if(ENABLE_SECCOMP)
     26   # Check if system has seccomp
     27   message(STATUS "Looking for seccomp")
     28   find_path(SECCOMP NAMES "linux/seccomp.h")
     29   if(SECCOMP)
     30     message(STATUS "Looking for seccomp - found")
     31     add_definitions(-DHAVE_SECCOMP)
     32   else()
     33     message(STATUS "Looking for seccomp - not found")
     34   endif()
     35 endif(ENABLE_SECCOMP)
     36 
     37 set(SRC src/statzone.cpp src/strtolower.cpp)
     38 
     39 add_definitions(-Wall -Wextra -std=c++11 -pedantic)
     40 add_executable(statzone ${SRC})
     41 
     42 install(TARGETS statzone DESTINATION ${CMAKE_INSTALL_BINDIR})
     43 install(FILES statzone.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
     44 
     45 enable_testing()
     46 add_test(statzone statzone)
     47 add_test(processing statzone ${PROJECT_SOURCE_DIR}/tests/arpa.zone)