From 4887b311d395ce852170123eb79d233df42a6744 Mon Sep 17 00:00:00 2001 From: Kaian Date: Thu, 12 Apr 2018 12:51:25 +0200 Subject: [PATCH] include config.h.cmake.in for cmake configurable defines --- .gitignore | 3 ++- CMakeLists.txt | 2 +- src/config.h.cmake.in | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/config.h.cmake.in diff --git a/.gitignore b/.gitignore index eafa791..ac66b01 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,8 @@ tests/test-??? **.deps .dirstamp *gmon.out -src/config.h* +src/config.h +src/config.h.in* src/stamp-h1 .autotools diff --git a/CMakeLists.txt b/CMakeLists.txt index caf5042..d2c79d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 99) add_compile_options(-Werror) configure_file( - ${PROJECT_SOURCE_DIR}/src/config.h.cmake + ${PROJECT_SOURCE_DIR}/src/config.h.cmake.in ${PROJECT_SOURCE_DIR}/src/config.h ) diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in new file mode 100644 index 0000000..b9f0255 --- /dev/null +++ b/src/config.h.cmake.in @@ -0,0 +1,43 @@ +/************************************************************************** +** +** sngrep - SIP Messages flow viewer +** +** Copyright (C) 2013-2018 Ivan Alonso (Kaian) +** Copyright (C) 2013-2018 Irontec SL. All rights reserved. +** +** This program is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program. If not, see . +** +****************************************************************************/ +#ifndef SNGREP_CONFIG_H +#define SNGREP_CONFIG_H + +#define PACKAGE "@PROJECT_NAME@" +#define VERSION "@PROJECT_VERSION@" + +#cmakedefine PROJECT_NAME +#cmakedefine PROJECT_VERSION +#cmakedefine PROJECT_VERSION_MAJOR +#cmakedefine PROJECT_VERSION_MINOR +#cmakedefine PROJECT_VERSION_PATCH + +#cmakedefine USE_EEP + +#cmakedefine USE_IPV6 + +#cmakedefine WITH_GNUTLS + +#cmakedefine WITH_OPENSSL + + +#endif //SNGREP_CONFIG_H