Merge branch 'prerelease-3.2.1' of mmka:unres into prerelease-3.2.1
[unres.git] / source / lib / xdrf / CMakeLists.txt
1 #
2 # CMake project file for UNRESPACK
3 #
4
5 # m4 macro processor 
6 add_custom_command(
7    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c
8    COMMAND m4 
9    ARGS ${CMAKE_CURRENT_SOURCE_DIR}/underscore.m4 ${CMAKE_CURRENT_SOURCE_DIR}/libxdrf.m4 > ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c
10    VERBATIM
11 )
12
13 # add headers from current dir
14 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
15 # compile the libxdrf library
16 add_library(xdrf STATIC ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.c ftocstr.c)
17 set(UNRES_XDRFLIB ${CMAKE_CURRENT_BINARY_DIR}/libxdrf.a PARENT_SCOPE)
18
19 #add_dependencies( ${UNRES_BIN} xdrf )