statzone

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

CMakeLists.txt (1147B)


      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 
     13 cmake_minimum_required(VERSION 2.8.12)
     14 
     15 project(statzone CXX)
     16 
     17 include(CheckFunctionExists)
     18 include(GNUInstallDirs)
     19 
     20 # Conditional build options
     21 set(ENABLE_SECCOMP 0 CACHE BOOL "Enable building with seccomp")
     22 
     23 if(ENABLE_SECCOMP)
     24   # Check if system has seccomp
     25   message(STATUS "Looking for seccomp")
     26   find_path(SECCOMP NAMES "linux/seccomp.h")
     27   if(SECCOMP)
     28     message(STATUS "Looking for seccomp - found")
     29     add_definitions(-DHAVE_SECCOMP)
     30   else()
     31     message(STATUS "Looking for seccomp - not found")
     32   endif()
     33 endif(ENABLE_SECCOMP)
     34 
     35 set(SRC src/statzone.cpp src/strtolower.cpp)
     36 
     37 add_definitions(-Wall -Wextra -std=c++11 -pedantic)
     38 add_executable(statzone ${SRC})
     39 
     40 install(TARGETS statzone DESTINATION ${CMAKE_INSTALL_BINDIR})
     41 install(FILES statzone.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
     42 
     43 enable_testing()
     44 add_test(statzone statzone)
     45 add_test(processing statzone ${PROJECT_SOURCE_DIR}/tests/arpa.zone)