Skip to content

Commit

Permalink
CMake: Don't use include_directories for pnetcdf
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Jan 17, 2024
1 parent e728555 commit fd6421d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ ENDIF(ENABLE_LIBXML2)
################################
IF(ENABLE_PNETCDF)
find_package(PNETCDF 1.6.0 REQUIRED)
include_directories(${PNETCDF_INCLUDE_DIR})
ENDIF()

################################
Expand Down
4 changes: 4 additions & 0 deletions libdispatch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ IF(STATUS_PARALLEL)
target_link_libraries(dispatch PUBLIC MPI::MPI_C)
ENDIF(STATUS_PARALLEL)

if (ENABLE_PNETCDF)
target_link_libraries(dispatch PUBLIC pnetcdf::pnetcdf)
endif()

IF(ENABLE_NCZARR)
target_include_directories(dispatch PUBLIC ../libnczarr)
ENDIF(ENABLE_NCZARR)
Expand Down
5 changes: 2 additions & 3 deletions liblib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ IF(USE_HDF4)
SET(TLL_LIBS ${HDF4_MFHDF_LIB} ${HDF4_DF_LIB} ${TLL_LIBS})
ENDIF()

IF(ENABLE_PNETCDF AND PNETCDF)
SET(TLL_LIBS ${TLL_LIBS} ${PNETCDF})
IF(ENABLE_PNETCDF)
SET(TLL_LIBS ${TLL_LIBS} pnetcdf::pnetcdf)
ENDIF()


IF(ENABLE_S3)
IF(ENABLE_S3_AWS)
TARGET_LINK_DIRECTORIES(netcdf PUBLIC ${AWSSDK_LIB_DIR})
Expand Down
1 change: 1 addition & 0 deletions libsrcp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
SET(libsrcp_SOURCES ncpdispatch.c)

add_library(netcdfp OBJECT ${libsrcp_SOURCES})
target_link_libraries(netcdfp PUBLIC pnetcdf::pnetcdf)

ADD_EXTRA_DIST(${libsrcp_SOURCES} CMakeLists.txt)

0 comments on commit fd6421d

Please sign in to comment.