bdf2sfd

BDF to SFD converter, allowing to vectorize bitmap fonts
Log | Files | Refs | README | LICENSE

commit 60974a614ddc122d718c0788e36c012bf25cec2f
parent 5e6e285bb1cead12276b65a997eaedebc741fab6
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue,  9 Jun 2020 19:35:50 +0200

Add ENABLE_SECCOMP build option, to allow building seccomp support.

It is disabled by default as it needs more testing on non !amd64 platforms.

Diffstat:
MCMakeLists.txt | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -17,11 +17,27 @@ project(bdf2sfd C) include(CheckFunctionExists) include(GNUInstallDirs) +# Conditional build options +set(ENABLE_SECCOMP 0 + CACHE BOOL "Enable building with seccomp") + # Check if system has pledge and strtonum list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_OPENBSD_SOURCE) check_function_exists(pledge HAVE_PLEDGE) check_function_exists(strtonum HAVE_STRTONUM) +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=1) + else() + message(STATUS "Looking for seccomp - not found") + endif() +endif(ENABLE_SECCOMP) + # Additional include directories for compat functions + dependencies include_directories("compat")