chakra-core/ChakraCore

Feature Request: Enable ChakraCore embedding using CMake.

Open

#1.616 geöffnet am 21. Sept. 2016

Auf GitHub ansehen
 (22 Kommentare) (0 Reaktionen) (1 zugewiesene Person)JavaScript (1.374 Forks)batch import
LinuxOSXSuggestionhelp wanted

Repository-Metriken

Stars
 (9.000 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I noticed that the current system for integrating ChakraCore using CMake is not exactly one of the most friendly. All this really boils down to is simplifying the auto-detection for CMake to where all of the platform dependent configuration is handled easily, and build options are easily configured by ChakraCore. In general this can be broken down into several tasks.

  • Improve CMake build configuration on linux/OS X
    • add basic Platform Detection options to cmake. [1]
    • Use find_package command on non-windows systems[2]
      • locate libunwind using find_package.
      • locate libuuid using find_package.
      • locate ICU Common library and Data files ( icu-uc ) using find_package
      • locate ICU Internationalization library (icu-i18n) using find_package
    • add CPack support [3] [4]
  • Add more configuration options to CMAKE.
    • rename ChakraCore specific options/defines.
    • add option to Disable ChakraCore install options.
    • add option to Disable ChakraCore programs.
    • add option to Disable ChakraCore JIT features
  • Implement ChakraCore embedding using CMake in a fashion similar to GLFW. [5]
    • add configuration option for embedding ChakraCore through CMake.
    • add a custom target to copy ChakraCore.h, ChakraCommon.h, ChakraCommonWindows.h and ChakraDebug.h to a different folder when ChakraCore embedding option is true. [6]
    • Verify embedded ChakraCore using CMake works on Linux.
    • Verify embedded ChakraCore using CMake works on OS X.
    • Verify embedded ChakraCore using CMake works on Windows. [7]

[1] CMake Wiki: How To Write Platform Checks [2] CMake Wiki: How To Find Libraries [3] CPack is highly useful for when users want to generate installable packages using for chakra. [3] CMake Wiki: Packaging With CPack [4] GLFW: Building Applications [5] For Simplicity's sake, this target will create the folder ${CMAKE_BINARY_DIR}/include, and then proceed to copy these headers to the newly created folder during configuration. [6] Most developers on windows will probably never use this option, but this should be a fairly straight forward fix.

Contributor Guide