netcdf-c/libhdf4/CMakeLists.txt

29 lines
709 B
CMake
Raw Normal View History

2018-02-08 21:20:58 +08:00
## This is a CMake file, part of Unidata's netCDF package.
# Copyright 2018, see the COPYRIGHT file for more information.
#
# This builds the HDF4 dispatch layer.
#
# Ed Hartnett
# Build the HDF4 dispatch layer as a library that will be included in
# the netCDF library.
add_library(netcdfhdf4 OBJECT ${libhdf4_SOURCES})
2024-03-01 01:36:47 +08:00
target_sources(netcdfhdf4
PRIVATE
hdf4dispatch.c
hdf4file.c
hdf4func.c
hdf4var.c
)
if (NETCDF_ENABLE_DLL)
2024-03-01 01:36:47 +08:00
target_compile_definitions(netcdfhdf4 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()
target_link_libraries(netcdfhdf4 PUBLIC ${HDF4_LIBRARIES})
2018-02-08 21:20:58 +08:00
# Remember to package this file for CMake builds.
ADD_EXTRA_DIST(${libhdf4_SOURCES} CMakeLists.txt)