A boilerplate starter project for applications using pntr and pntr_app.
-
Open up CMakeLists.txt and rename the project name from "pntr_app_starter" to your own application name.
project(MyGame DESCRIPTION "My Game" VERSION 0.0.1 LANGUAGES C )
-
Edit main.c as much as you'd like
The build process uses CMake.
A package.json is included (even though it's not a node project) to quickly document all the things you can do with npm run
.
cmake -B build -DSDL=true -DRAYLIB=true -DLIBRETRO=true -DCLI=true -DCMAKE_BUILD_TYPE=Release
cmake --build build
Use the Emscripten SDK to build for the web with raylib.
emcmake cmake -B build -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-s USE_GLFW=3" -DCMAKE_EXECUTABLE_SUFFIX=".html"
emmake make -C build
emrun build/index.html
While the cmake definition for libretro is there, you may want to use the make
directly.
LIBRETRO_COMMON_DIR=path/to/libretro-common \
LIBRETRO_DEPS_DIR=path/to/libretro-deps \
PNTR_DIR=path/to/pntr \
PNTR_APP_DIR=path/to/pntr_app \
TARGET_NAME=myproject \
CORE_DIR=. \
SOURCES=main.c \
make -C .cmake
Unless stated otherwise, all works are:
- Copyright (c) 2023 Rob Loach
... and licensed under: