2018-12-07 06:47:47 +08:00
|
|
|
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|
|
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
|
|
|
|
# 2015, 2016, 2017, 2018
|
|
|
|
# University Corporation for Atmospheric Research/Unidata.
|
|
|
|
|
|
|
|
# See netcdf-c/COPYRIGHT file for more info.
|
2024-03-01 01:36:47 +08:00
|
|
|
set(oc_SOURCES oc.c daplex.c dapparse.c dapy.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c)
|
2012-08-04 06:24:29 +08:00
|
|
|
|
2017-11-04 06:07:39 +08:00
|
|
|
add_library(oc2 OBJECT ${oc_SOURCES})
|
2012-08-04 06:24:29 +08:00
|
|
|
|
2024-03-19 04:34:43 +08:00
|
|
|
if (NETCDF_ENABLE_DLL)
|
2024-03-01 01:36:47 +08:00
|
|
|
target_compile_definitions(oc2 PRIVATE DLL_NETCDF DLL_EXPORT)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(STATUS_PARALLEL)
|
2023-09-29 22:42:19 +08:00
|
|
|
target_link_libraries(oc2 PUBLIC MPI::MPI_C)
|
2024-03-01 01:36:47 +08:00
|
|
|
endif(STATUS_PARALLEL)
|
2024-04-04 01:42:59 +08:00
|
|
|
target_link_libraries(oc2 PUBLIC CURL::libcurl ${CURL_LIBRARIES})
|
2024-02-27 08:34:00 +08:00
|
|
|
target_include_directories(oc2 PUBLIC ${CURL_INCLUDE_DIRS})
|
|
|
|
target_compile_options(oc2
|
|
|
|
PRIVATE
|
|
|
|
-DCURL_STATICLIB=1
|
|
|
|
)
|
2023-09-29 22:42:19 +08:00
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
# Apparently fails under cmake
|
|
|
|
#set(ocprint_FILES ocprint.c )
|
|
|
|
#ADD_EXECUTABLE(ocprint ${ocprint_FILES})
|
|
|
|
#TARGET_LINK_LIBRARIES(ocprint oc2 ${ALL_TLL_LIBS})
|
|
|
|
|
2013-06-04 00:42:04 +08:00
|
|
|
## Specify files to be distributed by 'make dist'
|
2024-03-01 01:36:47 +08:00
|
|
|
file(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
|
|
|
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
|
|
|
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} dap.y)
|
|
|
|
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} ocauth.html)
|
2014-06-12 05:51:31 +08:00
|
|
|
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|