2016-11-08 14:25:47 -08:00
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2016-10-26 12:20:46 -07:00
|
|
|
|
message(FATAL_ERROR "Static building not supported yet")
|
|
|
|
|
endif()
|
|
|
|
|
include(vcpkg_common_functions)
|
2016-10-11 14:10:09 +08:00
|
|
|
|
find_program(POWERSHELL powershell)
|
|
|
|
|
|
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ChakraCore-1.2.0.0)
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE_FILE
|
|
|
|
|
URLS "https://github.com/Microsoft/ChakraCore/archive/v1.2.0.0.tar.gz"
|
|
|
|
|
FILENAME "ChakraCore-1.2.0.0.tar.gz"
|
|
|
|
|
SHA512 53e487028a30605a4e2589c40b65da060ca4884617fdba8877557e4db75f911be4433d260132cce3526647622bdc742a0aacda1443a16dfed3d3fdd442539528
|
|
|
|
|
)
|
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
|
|
|
|
|
2016-10-11 14:18:42 +08:00
|
|
|
|
message(STATUS "Patching JavascriptPromise.cpp for https://github.com/Microsoft/ChakraCore/issues/1429")
|
2016-10-11 14:10:09 +08:00
|
|
|
|
vcpkg_execute_required_process(
|
|
|
|
|
COMMAND ${POWERSHELL} -command (gc lib/runtime/library/JavascriptPromise.cpp -encoding utf7) -replace('«', '^<^<') -replace('»', '^>^>') | Set-Content lib/runtime/library/JavascriptPromise.cpp
|
|
|
|
|
WORKING_DIRECTORY ${SOURCE_PATH}
|
|
|
|
|
)
|
|
|
|
|
message(STATUS "Patching done.")
|
|
|
|
|
|
|
|
|
|
vcpkg_build_msbuild(
|
|
|
|
|
PROJECT_PATH ${SOURCE_PATH}/Build/Chakra.Core.sln
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/lib/jsrt/ChakraCore.h
|
|
|
|
|
${SOURCE_PATH}/lib/jsrt/ChakraCommon.h
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
|
|
|
|
${SOURCE_PATH}/LICENSE.txt
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/ChakraCore RENAME copyright)
|