[libdivide] Add new port (#8320)

* [libdivide] Add new port

* Update to v3.0
This commit is contained in:
NancyLi1013 2019-10-30 13:50:12 -07:00 committed by Griffin Downs
parent 628e795c6a
commit 34eff46c92
2 changed files with 38 additions and 0 deletions

7
ports/libdivide/CONTROL Normal file
View File

@ -0,0 +1,7 @@
Source: libdivide
Version: 3.0
Homepage: https://github.com/ridiculousfish/libdivide
Description: libdivide.h is a header-only C/C++ library for optimizing integer division.
Feature: test
Description: Build test

View File

@ -0,0 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ridiculousfish/libdivide
REF v3.0
SHA512 fae17a4125c3b17aeb37283d7bba9fea2e4d3b208861d6ed81a6cdcf5dbf3286cf676cedba99c73a16115cf8bf9dcbd2cf6a48ca52fb85d4b0b24024e53d055e
HEAD_REF master
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
test BUILD_TESTS
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
-DLIBDIVIDE_SSE2=OFF
-DLIBDIVIDE_AVX2=OFF
-DLIBDIVIDE_AVX512=OFF
-DENABLE_VECTOR_EXTENSIONS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)