2017-02-28 18:09:59 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-04-03 11:35:44 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Unidata/netcdf-c
|
|
|
|
REF v4.6.2
|
|
|
|
SHA512 7c7084e80cf2fb86cd05101f5be7b74797ee96bf49afadfae6ab32ceed6cd9a049bfa90175e7cc0742806bcd2f61156e33fe7930c7b646661d9c89be6b20dea3
|
|
|
|
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
|
|
|
|
transitive-hdf5.patch
|
|
|
|
fix_curl_linkage.patch
|
2017-02-28 18:09:59 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2019-04-03 11:35:44 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
|
|
|
PREFER_NINJA
|
2017-02-28 18:09:59 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_UTILITIES=OFF
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DENABLE_EXAMPLES=OFF
|
|
|
|
-DENABLE_TESTS=OFF
|
|
|
|
-DUSE_HDF5=ON
|
|
|
|
-DENABLE_DAP_REMOTE_TESTS=OFF
|
|
|
|
-DDISABLE_INSTALL_DEPENDENCIES=ON
|
|
|
|
-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)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/netcdf-c)
|
2019-02-23 07:24:59 +08:00
|
|
|
file(
|
|
|
|
RENAME
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/netcdf-c/COPYRIGHT
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/netcdf-c/copyright
|
|
|
|
)
|