vcpkg/ports/jsonnet/portfile.cmake

30 lines
985 B
CMake
Raw Normal View History

2017-09-04 03:44:15 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/jsonnet
2018-06-13 01:32:58 +08:00
REF 80c9160b33503d2812ea807414f5a585168696d0
SHA512 3cddf983bbfd9dc29c40106c472d01d420d3644dc8f1de3d5968ec91b5a8aaefa1b7c0789df335a8791ff155337a47260f646b068faf9c0fe60e2e15bd3d1c67
2017-09-04 03:44:15 +08:00
HEAD_REF master
)
vcpkg_execute_required_process(
COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h"
WORKING_DIRECTORY ${SOURCE_PATH}
LOGNAME "std.jsonnet"
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsonnet RENAME copyright)