--- /dev/null
+#
+# CMake project file for UNRESPACK
+#
+
+# m4 macro processor
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c
+ COMMAND m4
+ ARGS ${CMAKE_CURRENT_SOURCE_DIR}/underscore.m4 ${CMAKE_CURRENT_SOURCE_DIR}/libxdrf.m4 > ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c
+ VERBATIM
+)
+
+# add headers from current dir
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+# compile the libxdrf library
+add_library(xdrf STATIC ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c ftocstr.c)
+set(UNRES_XDRFLIB ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.a PARENT_SCOPE)
+
+#add_dependencies( ${UNRES_BIN} xdrf )