netcdf-c/libncxml/CMakeLists.txt

27 lines
530 B
CMake
Raw Normal View History

2024-03-01 01:36:47 +08:00
if(HAVE_LIBXML2)
set(libncxml_SOURCES ncxml_xml2.c)
else()
set(libncxml_SOURCES ncxml_tinyxml2.cpp tinyxml2.cpp tinyxml2.h)
endif()
add_library(ncxml OBJECT ${libncxml_SOURCES})
2024-03-01 01:36:47 +08:00
if(HAVE_LIBXML2)
target_include_directories(ncxml
PUBLIC
./include
PRIVATE
${LIBXML2_INCLUDE_DIRS}
)
2024-03-01 01:36:47 +08:00
else()
target_include_directories(ncxml
PUBLIC
2024-01-27 06:23:15 +08:00
./include
)
2024-03-01 01:36:47 +08:00
endif(HAVE_LIBXML2)
2024-03-01 01:36:47 +08:00
if (ENABLE_DLL)
target_compile_definitions(ncxml PRIVATE DLL_NETCDF DLL_EXPORT)
endif()
2024-03-01 01:36:47 +08:00
add_extra_dist(CMakeLists.txt license.txt)