From 6c117ee482c5333563df910244ec5ce900f8dcce Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Tue, 14 Jan 2025 07:44:20 +0300 Subject: [PATCH] Add CMakeLists.txt --- .gitignore | 1 + CMakeLists.txt | 19 +++++++++++++++++++ src/fpattern.c | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9dae90d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.16) + +project(fpattern + LANGUAGES C + VERSION "1.0.0" +) + +add_library(fpattern-static src/fpattern.c) +add_library(fpattern::fpattern ALIAS fpattern-static) + +if(NOT WIN32) + target_compile_definitions(fpattern-static PRIVATE + "-Dunix" + ) +endif() + +target_include_directories(fpattern-static PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/include" +) diff --git a/src/fpattern.c b/src/fpattern.c index fb4d1f5..e0a839d 100644 --- a/src/fpattern.c +++ b/src/fpattern.c @@ -51,7 +51,7 @@ * * Queries about this source code can be sent to: * -* Copyright ©1997-2001 by David R. Tribble, all rights reserved. +* Copyright �1997-2001 by David R. Tribble, all rights reserved. */ @@ -89,9 +89,9 @@ static const char copyright[] = /* Local includes */ -#include "debug.h" +#include "fpattern/debug.h" -#include "fpattern.h" +#include "fpattern/fpattern.h" /* Local constants */