From dced39d7951c16ca7bc83d7964b17ea203293990 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 11 Sep 2008 11:15:55 -0500 Subject: Initial cmake support. --- CMakeLists.txt | 7 +++++++ src/configtemplate.h | 2 +- src/resample_defs.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..47b0b10 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +project(libresample) +include(CheckIncludeFiles) +check_include_files(inttypes.h HAVE_INTTYPES_H) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/configtemplate.h ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) +find_file(HAVE_INTTYPES_H inttypes.h) +add_library(resample SHARED src/filterkit.c src/resample.c src/resamplesubs.c) +set_target_properties(resample PROPERTIES VERSION 1.0 SOVERSION 1) diff --git a/src/configtemplate.h b/src/configtemplate.h index 94ae1ce..bc1cd71 100644 --- a/src/configtemplate.h +++ b/src/configtemplate.h @@ -3,5 +3,5 @@ use this file as a template to create config.h */ -#undef HAVE_INTTYPES_H +#cmakedefine HAVE_INTTYPES_H diff --git a/src/resample_defs.h b/src/resample_defs.h index 576c1bc..ccaf3ee 100644 --- a/src/resample_defs.h +++ b/src/resample_defs.h @@ -52,7 +52,7 @@ #define SGN(x) ((x)<0 ?(-1):((x)==0?(0):(1))) #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H #include typedef char BOOL; typedef int32_t WORD; -- cgit