"Fossies" - the Fresh Open Source Software Archive

Member "Pound-3.0.2/CMakeLists.txt" (28 Nov 2021, 3057 Bytes) of package /linux/www/Pound-3.0.2.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 3.0.1_vs_3.0.2.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 # tunable variables - regenerate pound.h for it to take effect
    2 set (VERSION "3.0.2")
    3 set (MAXBUF 8192)
    4 set (MAXHEADERS 128)
    5 set (RESURRECT_CYCLE 60)
    6 set (RESURRECT_TO 15)
    7 set (HASH_FUNCTION HASH_FNV)
    8 set (LOG_FACILITY LOG_DAEMON)
    9 set (H2TABSIZE 4096)
   10 set (H2FRAMESIZE 16384)
   11 
   12 # from here on there should be nothing to change
   13 cmake_minimum_required(VERSION 3.0)
   14 project(Pound C)
   15 
   16 if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GCC" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
   17 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result -Wno-cast-qual -Wno-discarded-qualifiers -D_GNU_SOURCE -O2")
   18 endif()
   19 
   20 include_directories(include)
   21 
   22 file(GLOB SOURCES "src/*.c")
   23 
   24 add_executable(pound ${SOURCES})
   25 
   26 set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
   27 set(THREADS_PREFER_PTHREAD_FLAG TRUE)
   28 find_package(Threads REQUIRED)
   29 
   30 include(CheckIncludeFiles)
   31 CHECK_INCLUDE_FILES("stdio.h;pthread.h;yaml.h;nanomsg/nn.h;nanomsg/inproc.h;nanomsg/pipeline.h;nanomsg/pair.h;nanomsg/reqrep.h;stdlib.h;unistd.h;fcntl.h;ctype.h;getopt.h;string.h;syslog.h;sys/types.h;sys/socket.h;netdb.h;sys/stat.h;time.h;poll.h;semaphore.h;pwd.h;grp.h;signal.h;setjmp.h;mbedtls/config.h;mbedtls/certs.h;mbedtls/oid.h;mbedtls/asn1.h;mbedtls/x509.h;mbedtls/entropy.h;mbedtls/ctr_drbg.h;mbedtls/ssl.h;mbedtls/error.h" HAVE_MANDATORY_INCLUDES LANGUAGE C)
   32 if(NOT HAVE_MANDATORY_INCLUDES)
   33 message(FATAL_ERROR "Missing mandatory header files!")
   34 endif()
   35 
   36 CHECK_INCLUDE_FILES(pcre2posix.h HAVE_PCRE2POSIX_H)
   37 CHECK_INCLUDE_FILES(pcre/pcre2posix.h HAVE_PCRE_PCRE2POSIX_H)
   38 CHECK_INCLUDE_FILES(pcreposix.h HAVE_PCREPOSIX_H)
   39 CHECK_INCLUDE_FILES(pcre/pcreposix.h HAVE_PCRE_PCREPOSIX_H)
   40 CHECK_INCLUDE_FILES(regex.h HAVE_REGEX_H)
   41 CHECK_INCLUDE_FILES(stdarg.h HAVE_STDARG_H)
   42 
   43 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/pound.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/pound.h)
   44 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MKDIST.in ${CMAKE_CURRENT_SOURCE_DIR}/MKDIST)
   45 
   46 target_link_libraries(pound -lyaml)
   47 target_link_libraries(pound -lnanomsg)
   48 target_link_libraries(pound -lpthread)
   49 target_link_libraries(pound Threads::Threads)
   50 
   51 FIND_LIBRARY(TCMALLOC tcmalloc )
   52 if(TCMALLOC)
   53 target_link_libraries(pound -ltcmalloc)
   54 endif()
   55 
   56 FIND_LIBRARY(MBEDCRYPTO mbedcrypto)
   57 if(MBEDCRYPTO)
   58 target_link_libraries(pound -lmbedcrypto)
   59 endif()
   60 
   61 FIND_LIBRARY(MBEDX509 mbedx509)
   62 if(MBEDX509)
   63 target_link_libraries(pound -lmbedx509)
   64 endif()
   65 
   66 FIND_LIBRARY(MBEDTLS mbedtls)
   67 if(MBEDTLS)
   68 target_link_libraries(pound -lmbedtls)
   69 endif()
   70 
   71 if(NOT MBEDCRYPTO OR NOT MBEDX509 OR NOT MBEDTLS)
   72 message(FATAL_ERROR "Missing mandatory library MbedTLS!")
   73 endif()
   74 
   75 if(HAVE_PCRE2POSIX_H OR HAVE_PCRE_PCRE2POSIX_H)
   76 FIND_LIBRARY(PCRE pcre2-posix)
   77 if(PCRE)
   78 target_link_libraries(pound -lpcre2-posix -lpcre2-8)
   79 else()
   80 message(FATAL_ERROR "pcre2posix.h found but libpcre2-posix is not available!")
   81 endif()
   82 else()
   83 if(HAVE_PCREPOSIX_H OR HAVE_PCRE_PCREPOSIX_H)
   84 FIND_LIBRARY(PCRE pcreposix)
   85 if(PCRE)
   86 target_link_libraries(pound -lpcreposix)
   87 else()
   88 message(FATAL_ERROR "pcreposix.h found but libpcreposix is not available!")
   89 endif()
   90 endif()
   91 endif()