mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 16:39:01 +08:00
63 lines
2.4 KiB
CMake
63 lines
2.4 KiB
CMake
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
endif()
|
|
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
|
message(FATAL_ERROR "Static linking of the CRT is not yet supported.")
|
|
endif()
|
|
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/ChakraCore
|
|
REF v1.4.3
|
|
SHA512 6083bbbb4b980f44fe0e1d3581eea17190e379134f9312f11d195694aa3e0d9723406d8048ce461bc2744306c07b44465d6d58636b114a82b2f42d7a3316c9af
|
|
HEAD_REF master
|
|
)
|
|
|
|
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)
|
|
|
|
vcpkg_build_msbuild(
|
|
PROJECT_PATH ${SOURCE_PATH}/Build/Chakra.Core.sln
|
|
OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props"
|
|
)
|
|
|
|
file(INSTALL
|
|
${SOURCE_PATH}/lib/jsrt/ChakraCore.h
|
|
${SOURCE_PATH}/lib/jsrt/ChakraCommon.h
|
|
${SOURCE_PATH}/lib/jsrt/ChakraCommonWindows.h
|
|
${SOURCE_PATH}/lib/jsrt/ChakraDebug.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}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe
|
|
${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore)
|
|
vcpkg_copy_pdbs()
|
|
file(INSTALL
|
|
${SOURCE_PATH}/LICENSE.txt
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/ChakraCore RENAME copyright)
|