vcpkg/ports/simsimd/portfile.cmake

31 lines
900 B
CMake
Raw Normal View History

2023-09-14 08:06:48 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ashvardanian/SimSIMD
REF "v${VERSION}"
2024-10-04 23:42:29 +08:00
SHA512 abddc3522f28602c0bfbdcdf3f045b3ffbb88cc9182741333df7a7e6d8fcf523dbd876b30381cdc741b712c42665f65796477ec3c458cdd9ef4ac4e4038b9052
2023-09-14 08:06:48 +08:00
HEAD_REF main
PATCHES
export-target.patch
2023-09-14 08:06:48 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSIMSIMD_BUILD_TESTS=OFF
-DSIMSIMD_BUILD_BENCHMARKS=OFF
"-DSIMSIMD_BUILD_SHARED=${BUILD_SHARED}"
)
vcpkg_cmake_install()
if(BUILD_SHARED)
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-simsimd)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
else()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
endif()
2023-09-14 08:06:48 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")