2016-11-09 06:25:47 +08:00
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2016-11-09 06:38:47 +08:00
|
|
|
|
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
2016-10-27 03:20:46 +08:00
|
|
|
|
endif()
|
2017-05-20 07:57:06 +08:00
|
|
|
|
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
|
|
|
|
message(FATAL_ERROR "Static linking of the CRT is not yet supported.")
|
|
|
|
|
endif()
|
2016-10-27 03:20:46 +08:00
|
|
|
|
include(vcpkg_common_functions)
|
2016-10-11 14:10:09 +08:00
|
|
|
|
|
2017-05-20 08:13:06 +08:00
|
|
|
|
vcpkg_from_github(
|
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
|
REPO Microsoft/ChakraCore
|
2017-11-30 05:12:11 +08:00
|
|
|
|
REF v1.7.4
|
|
|
|
|
SHA512 116ed75d3128f8d9e8ad5a12deed194e14403e05f495422b14277a31620a37b7c8324f04738947388393b0e204f7748bb81d90ebab3373a198db76b70f89f374
|
2017-05-20 08:13:06 +08:00
|
|
|
|
HEAD_REF master
|
2017-02-14 15:30:30 +08:00
|
|
|
|
)
|
|
|
|
|
|
2017-05-20 07:57:06 +08:00
|
|
|
|
find_path(COR_H_PATH cor.h)
|
|
|
|
|
if(COR_H_PATH MATCHES "NOTFOUND")
|
|
|
|
|
message(FATAL_ERROR "Could not find <cor.h>. Ensure the NETFXSDK is installed.")
|
|
|
|
|
endif()
|
|
|
|
|
get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE)
|
|
|
|
|
|
2018-02-24 17:43:37 +08:00
|
|
|
|
set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
|
|
|
|
file(REMOVE_RECURSE ${BUILDTREE_PATH})
|
|
|
|
|
file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH})
|
|
|
|
|
|
2016-10-11 14:10:09 +08:00
|
|
|
|
vcpkg_build_msbuild(
|
2018-02-24 17:43:37 +08:00
|
|
|
|
PROJECT_PATH ${BUILDTREE_PATH}/Build/Chakra.Core.sln
|
2017-05-20 08:13:06 +08:00
|
|
|
|
OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props"
|
2016-10-11 14:10:09 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/lib/jsrt/ChakraCore.h
|
|
|
|
|
${BUILDTREE_PATH}/lib/jsrt/ChakraCommon.h
|
|
|
|
|
${BUILDTREE_PATH}/lib/jsrt/ChakraCommonWindows.h
|
|
|
|
|
${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h
|
2016-10-11 14:10:09 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll
|
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb
|
2016-10-11 14:10:09 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib
|
2016-10-11 14:10:09 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll
|
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb
|
2016-10-11 14:10:09 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
|
|
|
)
|
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib
|
2016-10-11 14:10:09 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
|
|
|
)
|
2017-02-14 15:30:30 +08:00
|
|
|
|
file(INSTALL
|
2018-02-24 17:43:37 +08:00
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe
|
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe
|
|
|
|
|
${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe
|
2017-05-20 07:57:06 +08:00
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore)
|
2018-02-24 17:43:37 +08:00
|
|
|
|
|
2017-02-14 15:30:30 +08:00
|
|
|
|
vcpkg_copy_pdbs()
|
2016-10-11 14:10:09 +08:00
|
|
|
|
file(INSTALL
|
2017-05-20 07:57:06 +08:00
|
|
|
|
${SOURCE_PATH}/LICENSE.txt
|
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/ChakraCore RENAME copyright)
|