2021-07-23 06:36:06 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO microsoft/APSI
|
2023-11-29 14:50:03 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 ad49e169970921175728705c6f5fe8062e74900a601ea25e9f836840a221175bfbb3169717787b1ca7e2e1a0b26630690dcef9bc91c0123877b856ea927e9e68
|
2021-07-23 06:36:06 +08:00
|
|
|
HEAD_REF main
|
2023-01-27 03:51:51 +08:00
|
|
|
PATCHES
|
2023-11-29 14:50:03 +08:00
|
|
|
fix-find-seal.patch
|
|
|
|
fix-c2398.patch
|
2021-07-23 06:36:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
log4cplus APSI_USE_LOG4CPLUS
|
|
|
|
zeromq APSI_USE_ZMQ
|
|
|
|
)
|
|
|
|
|
2022-07-12 04:57:02 +08:00
|
|
|
set(CROSSCOMP_OPTIONS "")
|
2023-09-14 07:22:03 +08:00
|
|
|
if (VCPKG_CROSSCOMPILING)
|
2022-07-12 04:57:02 +08:00
|
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
2023-11-29 14:50:03 +08:00
|
|
|
set(CROSSCOMP_OPTIONS -DAPSI_FOURQ_ARM64_EXITCODE=0 -DAPSI_FOURQ_ARM64_EXITCODE__TRYRUN_OUTPUT='')
|
2022-07-12 04:57:02 +08:00
|
|
|
endif()
|
2023-09-14 07:22:03 +08:00
|
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
set(CROSSCOMP_OPTIONS -DAPSI_FOURQ_AMD64_EXITCODE=0 -DHAVE_AVX_EXTENSIONS_EXITCODE=0 -DHAVE_AVX2_EXTENSIONS_EXITCODE=1)
|
|
|
|
endif()
|
2022-07-12 04:57:02 +08:00
|
|
|
endif()
|
|
|
|
|
2021-07-23 06:36:06 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-11-23 04:28:19 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-07-23 06:36:06 +08:00
|
|
|
OPTIONS
|
2023-11-29 14:50:03 +08:00
|
|
|
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
|
|
|
-DAPSI_BUILD_TESTS=OFF
|
|
|
|
-DAPSI_BUILD_CLI=OFF
|
2021-07-23 06:36:06 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2022-07-12 04:57:02 +08:00
|
|
|
${CROSSCOMP_OPTIONS}
|
2021-07-23 06:36:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
2023-11-29 14:50:03 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/APSI-0.11")
|
2021-07-23 06:36:06 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-11-29 14:50:03 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|