summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/configtemplate.h2
-rw-r--r--src/resample_defs.h2
3 files changed, 9 insertions, 2 deletions
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 <inttypes.h>
typedef char BOOL;
typedef int32_t WORD;