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()
|
2021-11-02 12:37:05 +08:00
|
|
|
|
|
|
|
add_library(ncxml OBJECT ${libncxml_SOURCES})
|
2024-03-01 01:36:47 +08:00
|
|
|
if(HAVE_LIBXML2)
|
2024-02-24 05:06:17 +08:00
|
|
|
target_include_directories(ncxml
|
|
|
|
PUBLIC
|
|
|
|
./include
|
|
|
|
PRIVATE
|
|
|
|
${LIBXML2_INCLUDE_DIRS}
|
|
|
|
)
|
2024-03-01 01:36:47 +08:00
|
|
|
else()
|
2024-02-24 05:06:17 +08:00
|
|
|
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)
|
2021-11-02 12:37:05 +08:00
|
|
|
|
2024-03-01 01:36:47 +08:00
|
|
|
if (ENABLE_DLL)
|
|
|
|
target_compile_definitions(ncxml PRIVATE DLL_NETCDF DLL_EXPORT)
|
|
|
|
endif()
|
2021-11-02 12:37:05 +08:00
|
|
|
|
2024-03-01 01:36:47 +08:00
|
|
|
add_extra_dist(CMakeLists.txt license.txt)
|