2019-04-03 11:35:44 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Unidata/netcdf-c
|
2020-10-24 08:31:00 +08:00
|
|
|
REF 26fba54a58fa02af92d84441ed90b417c1d08161 # v4.7.4
|
|
|
|
SHA512 7144374b5bd3574ea422de07ffb30fecc4e5f560f9b46f62762cc0cce511dd33068b8df9244fe94ae3cc7b3a9bb9fe398c7e67c3e5ac2109768e5a9b984f24fb
|
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-08-11 07:08:37 +08:00
|
|
|
fix-dependency-libmath.patch
|
2020-11-12 07:19:56 +08:00
|
|
|
fix-linkage-error.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})
|
2020-10-24 08:31:00 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|