mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
...
This commit is contained in:
parent
4e1e08df61
commit
c0ccebe5d0
@ -16,8 +16,6 @@ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src BOX2D_BINDINGS_SRC)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_library(
|
||||
box2d
|
||||
STATIC
|
||||
|
@ -21,17 +21,14 @@ if(MSVC)
|
||||
add_compile_options("/utf-8")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
|
||||
|
||||
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/src POCKETPY_SRC)
|
||||
|
||||
option(PK_USE_BOX2D "Use Box2D" ON)
|
||||
option(PK_USE_BOX2D "Use Box2D" OFF)
|
||||
|
||||
if(PK_USE_BOX2D)
|
||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/3rd/box2d)
|
||||
include_directories(${CMAKE_CURRENT_LIST_DIR}/3rd/box2d/include)
|
||||
|
@ -7,12 +7,9 @@ label: box2d
|
||||
|
||||
## Setup
|
||||
|
||||
`box2d` module will be enabled **by default** for CMake users.
|
||||
You can set option `PK_USE_BOX2D` to `ON` in CMakeLists.txt to enable `box2d` module.
|
||||
All platforms are supported, including desktop, mobile and web.
|
||||
|
||||
You can set option `PK_USE_BOX2D` to `OFF` in CMakeLists.txt
|
||||
if you don't want to use it.
|
||||
|
||||
## Overview
|
||||
|
||||
The `box2d` module in pkpy provides a high-level, also simplified, interface to Box2D engine, which is suitable for most use cases.
|
||||
|
Loading…
x
Reference in New Issue
Block a user