-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow certain code modules to be removed from build process #1769
Conversation
Thanks, could add these new options to https://github.com/axmolengine/axmol/blob/dev/CMakeOptions.md? |
Will do! |
@rh101 seems this PR cause crash, just enter first test of cpp-tests on linux |
And recommend refactor this defines in /** Use physics integration API. */
// It works with:
// Chipmunk2D or Box2D
#ifndef AX_USE_PHYSICS
# define AX_USE_PHYSICS 1
#endif
#if (AX_USE_PHYSICS)
/** Use Chipmunk2D physics 2d engine on physics integration API. */
# ifndef AX_ENABLE_CHIPMUNK_INTEGRATION
# define AX_ENABLE_CHIPMUNK_INTEGRATION 0
# endif
/** or use Box2D physics 2d engine on physics integration API. */
# ifndef AX_ENABLE_BOX2D_INTEGRATION
# define AX_ENABLE_BOX2D_INTEGRATION 1
# endif
#endif // AX_USE_PHYSICS
/** Use 3d physics integration API. */
#ifndef AX_USE_3D_PHYSICS
# if (AX_TARGET_PLATFORM == AX_PLATFORM_IOS || AX_TARGET_PLATFORM == AX_PLATFORM_MAC || \
AX_TARGET_PLATFORM == AX_PLATFORM_WIN32 || AX_TARGET_PLATFORM == AX_PLATFORM_WINRT || \
AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID || AX_TARGET_PLATFORM == AX_PLATFORM_LINUX || \
AX_TARGET_PLATFORM == AX_PLATFORM_WASM)
# define AX_USE_3D_PHYSICS 0
# endif
#endif
#if (AX_USE_3D_PHYSICS)
/** Use bullet physics engine. */
# ifndef AX_ENABLE_BULLET_INTEGRATION
# define AX_ENABLE_BULLET_INTEGRATION 1
# endif
#endif
/** Use 3D navigation API */
#ifndef AX_USE_NAVMESH
# define AX_USE_NAVMESH 0
#endif |
Will do! I'll make the changes right now. Regarding Linux, I don't have a test box to use, but can set one up in around 12 hours (from this post). |
Describe your changes
This is an attempt at allowing a developer to turn off certain aspects of the game engine source so that they are not built, reducing build times and final binary file size.
The new options are:
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."
I have performed a self-review of my code.
Optional:
For core/new feature PR