vcpkg/ports/simsimd/portfile.cmake

31 lines
900 B
CMake
Raw Normal View History

2023-09-14 02:06:48 +02:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ashvardanian/SimSIMD
REF "v${VERSION}"
SHA512 ab78d4415ed0f2964470ccd36d3d737a2715b1a5a4222613d2f0f4be6a516da0e339329cbd421c6b7f6a1bc701da6ec2f3937cba5a8ea1f632beea8000d90c8f
2023-09-14 02:06:48 +02:00
HEAD_REF main
PATCHES
export-target.patch
2023-09-14 02:06:48 +02: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 02:06:48 +02:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")