microsoft / Chakra-Samples

Repository for Chakra JavaScript engine related samples.
MIT License
216 stars 84 forks source link

new-sample: Embed ChakraCore using CMake #68

Closed obastemur closed 7 years ago

obastemur commented 7 years ago

Linux / Windows / OSX

Embed ChakraCore via CMake using ChakraCoreEmbed.cmake as shown from CMakeLists.txt

obastemur commented 7 years ago

Once this merged, will also make this part of test/native-tests under ChakraCore to make sure keeping ChakraCoreEmbed.cmake up to date.

obastemur commented 7 years ago

Sample command line usage:

Windows

> cmake . -DCHAKRACORE_PATH=<ChakraCore Path> -G "Visual Studio 14 2015 Win64"
> msbuild /p:Platform=x64 HelloWorld.sln

> Debug\Sample.exe

Linux/OSX

> cmake . -DCHAKRACORE_PATH=<ChakraCore Path>
> make

> ./Sample
liminzhu commented 7 years ago

@obastemur good stuff 👍 ! Can you add a readme like this one documenting the proper build & run steps for different platforms?

obastemur commented 7 years ago

Added README, @liminzhu Thanks for review.