vcpkg/ports/pocketpy/portfile.cmake

32 lines
892 B
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pocketpy/pocketpy
REF "v${VERSION}"
SHA512 8c0b773fa6b113a7ef5bdf20837e46e61e17ed257c052e31c8bf08e88a911482b5617091c85f62d77f6145d8713c7ae08d70ce9f438f253ce21fb850520f0bcf
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DPK_BUILD_SHARED_LIB=${BUILD_SHARED}
-DPK_BUILD_STATIC_LIB=${BUILD_STATIC}
-DPK_ENABLE_OS=OFF
-DPK_USE_CJSON=OFF
2024-03-29 03:51:57 +08:00
-DPK_INSTALL=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")