diff --git a/README.md b/README.md index 732ab9bf..b184f8e2 100644 --- a/README.md +++ b/README.md @@ -40,16 +40,31 @@ These platforms are officially tested. ## Quick Start +You have two options to integrate pkpy into your project. + +#### Use the single header file + Download the `pocketpy.h` on our [GitHub Release](https://github.com/pocketpy/pocketpy/releases) page. -And `#include` it in your project. +And `#include` it in your project. It is recommended to use the latest dev version. -You can also use cmake to build it from source. See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details. -Some variables can be set to control the build process: -+ `PK_BUILD_STATIC_LIB` - Build the static library (default, recommended) -+ `PK_BUILD_SHARED_LIB` - Build the shared (for C-APIs only) -+ `PK_ENABLE_OS` - Enable OS related features (default mode is sandboxed) +#### Use CMake -It is safe to use `main` branch in production if CI is green. +Clone the whole repository as a submodule in your project, +In your CMakelists.txt, add the following lines: + +```cmake +add_subdirectory(pocketpy) +target_link_libraries(your_target pocketpy) + +if(EMSCRIPTEN) + # exceptions must be enabled for emscripten + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fexceptions") +endif() +``` + +See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details. + +It is safe to use `main` branch in production if CI badge is green. ### Compile Flags diff --git a/docs/quick-start/installation.md b/docs/quick-start/installation.md index 08fb4c33..14a17974 100644 --- a/docs/quick-start/installation.md +++ b/docs/quick-start/installation.md @@ -14,13 +14,9 @@ And `#include` it in your project. It is recommended to use the latest dev versi #### Use CMake Clone the whole repository as a submodule in your project, -You need **Python 3** installed on your system because CMakeLists.txt -requires it to generate some files. - In your CMakelists.txt, add the following lines: ```cmake -option(PK_BUILD_STATIC_LIB "Build static library" ON) add_subdirectory(pocketpy) target_link_libraries(your_target pocketpy) @@ -30,13 +26,9 @@ if(EMSCRIPTEN) endif() ``` -These variables can be set to control the build process: -+ `PK_BUILD_STATIC_LIB` - Build the static library -+ `PK_BUILD_SHARED_LIB` - Build the shared library - See [CMakeLists.txt](https://github.com/pocketpy/pocketpy/blob/main/CMakeLists.txt) for details. -It is safe to use `main` branch in production. +It is safe to use `main` branch in production if CI badge is green. ### Compile flags