Skip to content

Commit

Permalink
[TinyNPY] Add new port (#7393)
Browse files Browse the repository at this point in the history
* [TinyNPY] new port

* expose type and order

* fix linux/mac
  • Loading branch information
cdcseacave authored and cbezault committed Aug 7, 2019
1 parent 7352fab commit 8157d85
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/tinynpy/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: tinynpy
Version: 1.0.0-2
Build-Depends: zlib
Description: tiny C++ loader/exporter of python numpy array NPY/NPZ files
30 changes: 30 additions & 0 deletions ports/tinynpy/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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)

0 comments on commit 8157d85

Please sign in to comment.