From a75e43fdbe0fe5354a1f6d86c799b94774b427dd Mon Sep 17 00:00:00 2001 From: Will Sackfield Date: Wed, 15 Feb 2017 22:40:44 -0500 Subject: [PATCH] Add Cmake support --- CMakeLists.txt | 7 +++++++ src/CMakeLists.txt | 13 +++++++++++++ src/config.h.in | 1 + 3 files changed, 21 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/config.h.in diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4977a45 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.5) + +project(libresample) + +set(libresample_INCLUDE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include) + +add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..c3a2e57 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,13 @@ +include(CheckIncludeFiles) + +check_include_files(inttypes.h HAVE_INTTYPES_H) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) + +add_library(libresample STATIC configtemplate.h + filterkit.c + filterkit.h + resample_defs.h + resample.c + resamplesubs.c + config.h) +target_include_directories(libresample PUBLIC ${libresample_INCLUDE_DIRECTORY}) diff --git a/src/config.h.in b/src/config.h.in new file mode 100644 index 0000000..b14f598 --- /dev/null +++ b/src/config.h.in @@ -0,0 +1 @@ +#cmakedefine HAVE_INTTYPES_H 1 \ No newline at end of file