vcpkg/ports/tinynpy/portfile.cmake

31 lines
848 B
CMake
Raw Normal View History

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cdcseacave/TinyNPY
REF 721a498ebff5ba537a136c9df330158f5c85c00c
SHA512 c22382306ed7c33b147a93093cfb1217504e6dee8172b1684c0519e3b95bb3ac7ed48de7c6b6759db5187ce85301880702e28e08f149f369dbc630e5b646a06a
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DBUILD_DEMO=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/TinyNPY")
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinynpy RENAME copyright)