2012-07-11 01:45:28 +08:00
|
|
|
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(".")
|
|
|
|
|
2012-08-28 05:19:25 +08:00
|
|
|
|
|
|
|
IF(NOT MSVC)
|
2012-10-03 00:45:27 +08:00
|
|
|
# Process these files with m4.
|
|
|
|
SET(m4_SOURCES attr ncx putget t_ncxx)
|
|
|
|
foreach (f ${m4_SOURCES})
|
|
|
|
GEN_m4(${f})
|
|
|
|
endforeach(f)
|
2012-08-28 05:19:25 +08:00
|
|
|
ENDIF()
|
2012-07-14 00:37:14 +08:00
|
|
|
|
2012-09-07 05:50:00 +08:00
|
|
|
SET(libsrc_SOURCES v1hpg.c putget.c attr.c nc3dispatch.c nc3internal.c var.c dim.c ncx.c lookup3.c ncio.c)
|
2012-07-14 00:37:14 +08:00
|
|
|
|
2012-07-14 00:49:20 +08:00
|
|
|
IF (BUILD_DISKLESS)
|
|
|
|
SET(libsrc_SOURCES ${libsrc_SOURCES} memio.c)
|
2012-07-14 00:37:14 +08:00
|
|
|
|
2012-07-14 00:49:20 +08:00
|
|
|
IF (BUILD_MMAP)
|
|
|
|
SET(libsrc_SOURCES ${libsrc_SOURCES} mmapio.c)
|
|
|
|
ENDIF( BUILD_MMAP)
|
|
|
|
ENDIF (BUILD_DISKLESS)
|
|
|
|
|
|
|
|
IF (USE_FFIO)
|
|
|
|
SET(libsrc_SOURCES ${libsrc_SOURCES} ffio.c)
|
2012-07-17 06:31:35 +08:00
|
|
|
ELSE (USE_FFIO)
|
|
|
|
SET(libsrc_SOURCES ${libsrc_SOURCES} posixio.c)
|
2012-07-14 00:49:20 +08:00
|
|
|
ENDIF (USE_FFIO)
|
2012-07-11 01:45:28 +08:00
|
|
|
|
2012-07-19 05:12:58 +08:00
|
|
|
add_library(netcdf3 OBJECT ${libsrc_SOURCES})
|
2012-07-17 06:31:35 +08:00
|
|
|
|
|
|
|
# The C API man page.
|
|
|
|
set(man_MANS netcdf.3)
|
|
|
|
|
2012-10-18 05:14:30 +08:00
|
|
|
SET(MAN_FILES netcdf.3)
|
|
|
|
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man3")
|
|
|
|
|
|
|
|
|
2012-07-17 06:31:35 +08:00
|
|
|
set(ARGS_MANPAGE -DAPI=C)
|
|
|
|
|
|
|
|
IF (USE_NETCDF4)
|
|
|
|
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
|
|
|
ENDIF(USE_NETCDF4)
|
|
|
|
|
|
|
|
IF (BUILD_DAP)
|
|
|
|
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
|
|
|
ENDIF(BUILD_DAP)
|
|
|
|
|
|
|
|
IF (BUILD_PARALLEL)
|
|
|
|
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
|
|
|
ENDIF(BUILD_PARALLEL)
|
|
|
|
|