vcpkg/ports/chakracore/portfile.cmake

45 lines
1.6 KiB
CMake

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ChakraCore-1.3.0)
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://github.com/Microsoft/ChakraCore/archive/v1.3.0.tar.gz"
FILENAME "ChakraCore-1.3.0.tar.gz"
SHA512 d00757e25f5c62bfc29721bd8f715df8dbaf0ac14c1dbdb0735227535cb4f2a209ec3957f24bb6a7e2bced540475bbf3e54712a930fb517fdfd5adb4d56cea07
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
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)