|
|
@@ -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.
|
|
|
+
|
|
|
+#### Use CMake
|
|
|
+
|
|
|
+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()
|
|
|
+```
|
|
|
|
|
|
-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)
|
|
|
+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 is green.
|
|
|
+It is safe to use `main` branch in production if CI badge is green.
|
|
|
|
|
|
### Compile Flags
|
|
|
|