vcpkg/ports/tinynpy/portfile.cmake
Jack·Boos·Yu 6aa4fca940
[many ports]switch to vcpkg-cmake / vckg-cmake-config part 5 (#29918)
* [many ports]switch to vcpkg-cmake / vckg-cmake-config part 5

* version

* typo

* typo

* fix build

* version

* deprecated vcpkg_extract_source_archive_ex

* version

* fix argument

* version

* Rename argument

* version

* More changes about argument

* wrong op

* version

---------

Co-authored-by: jyu49 <yu_jack@apple.com>
2023-03-01 10:39:29 -08:00

28 lines
805 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cdcseacave/TinyNPY
REF 0a11001009cc3e8f3c95c61b92c0ce1bd52d5383
SHA512 a5fe962e433896a5c7363808e87fca1297c98496cf6b6fd98154f4f4bc113ea213e281ebcdbceadf47fc573b6d707097f3a06cc58bf26351ebf7f935954d79c0
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DBUILD_DEMO=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(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/${PORT}" RENAME copyright)