2019-04-03 11:35:44 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Unidata/netcdf-c
|
2020-01-11 07:34:09 +08:00
|
|
|
REF b7cd387bee8c661141fabb490f4969587c008c55 # v4.7.3
|
|
|
|
SHA512 a55391620fac61e4975fe62907ca21049911afce6190fc12d183d24133a32aae8cd223b97a3fe57fc82d8bdca1a7db451046e3be3c379051624d48b1f56c0332
|
2019-04-03 11:35:44 +08:00
|
|
|
HEAD_REF master
|
2017-02-28 18:09:59 +08:00
|
|
|
PATCHES
|
2019-03-15 05:30:51 +08:00
|
|
|
no-install-deps.patch
|
|
|
|
config-pkg-location.patch
|
2020-01-11 07:34:09 +08:00
|
|
|
use_targets.patch
|
2020-01-28 04:04:35 +08:00
|
|
|
mpi.patch
|
2020-08-11 07:08:37 +08:00
|
|
|
fix-dependency-libmath.patch
|
2017-02-28 18:09:59 +08:00
|
|
|
)
|
|
|
|
|
2019-06-09 05:08:59 +08:00
|
|
|
#Remove outdated find modules
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindSZIP.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindZLIB.cmake")
|
2020-01-11 07:34:09 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/windows/FindHDF5.cmake")
|
2019-06-09 05:08:59 +08:00
|
|
|
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
|
|
set(NC_USE_STATIC_CRT ON)
|
|
|
|
else()
|
|
|
|
set(NC_USE_STATIC_CRT OFF)
|
|
|
|
endif()
|
|
|
|
|
2017-02-28 18:09:59 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2020-01-11 07:34:09 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE # netcdf-c configures in the source!
|
2019-04-03 11:35:44 +08:00
|
|
|
PREFER_NINJA
|
2017-02-28 18:09:59 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_UTILITIES=OFF
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DENABLE_EXAMPLES=OFF
|
|
|
|
-DENABLE_TESTS=OFF
|
2019-06-09 05:08:59 +08:00
|
|
|
-DENABLE_FILTER_TESTING=OFF
|
2017-02-28 18:09:59 +08:00
|
|
|
-DUSE_HDF5=ON
|
|
|
|
-DENABLE_DAP_REMOTE_TESTS=OFF
|
|
|
|
-DDISABLE_INSTALL_DEPENDENCIES=ON
|
2019-06-09 05:08:59 +08:00
|
|
|
-DNC_USE_STATIC_CRT=${NC_USE_STATIC_CRT}
|
2017-02-28 18:09:59 +08:00
|
|
|
-DConfigPackageLocation=share/netcdf
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-12-01 06:19:06 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/netcdf)
|
2017-02-28 18:09:59 +08:00
|
|
|
|
2017-12-01 06:19:06 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
endif()
|
2017-02-28 18:09:59 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
2019-10-31 04:47:40 +08:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|