2019-12-21 04:00:29 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO dnp3/opendnp3
|
2021-11-23 12:34:30 +08:00
|
|
|
REF 3.1.1
|
|
|
|
SHA512 2d7b26753fa03596ab73944236e5f1d82656f38248cc23fd00f7a2cdac27f481e5fe51e68b5896b6740db1a6d9560f0262e473648e001601125f4af8b4a652c2
|
2019-12-21 04:00:29 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-11-23 12:34:30 +08:00
|
|
|
file(COPY "${CURRENT_PORT_DIR}/opendnp3-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATICLIBS)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tls DNP3_TLS
|
|
|
|
)
|
2019-12-21 04:00:29 +08:00
|
|
|
|
2021-11-23 12:34:30 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DDNP3_STATIC_LIBS=${STATICLIBS}
|
|
|
|
${FEATURE_OPTIONS}
|
2019-12-21 04:00:29 +08:00
|
|
|
)
|
|
|
|
|
2021-11-23 12:34:30 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-12-21 04:00:29 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-11-23 12:34:30 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-12-21 04:00:29 +08:00
|
|
|
|
2021-11-23 12:34:30 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|