AI powered VR application for Raspberry PI.
AI not implemented yet SDL2 needs to be migrated to SDL3
- Cmake
- Make (optional)
- Git
- GNU Compiler Collection (gcc, g++ etc.)
- Any optional 3Rd dependency
# clone the repo
git clone [email protected]:eheperson/theeye.git
# change access rights of compile.sh file
chmod +x bake.sh
As a step zero, you must link your 3Rd dependency to the project. There are 2 different options here for that purpose:
- Get the builded binaries and link them.
- Get the source code, build the source code then, link the binaries.
Here are the steps of building 3Rd dependenc from source and link it (Example to build and link SDL2 module) :
- If your 3Rd dependency on GitHub, you can add it easily as a git project submodule:
cd ./external/sources
git submodule add [email protected]:libsdl-org/SDL.git
# or just use git clone command
cd ./external/sources
git clone [email protected]:libsdl-org/SDL.git
- Create a build folder outside of the source code directory :
# create build folder
mkdir -p ../sdl2_build
- Configure the 3Rd dependency to prepare it for cmake build:
cd ./SDL
# configure
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../../sdl2 \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DCMAKE_C_FLAGS="-Werror,-Wno-declaration-after-statement" \
-DCMAKE_CXX_FLAGS="-Wno-declaration-after-statement" \
-S . \
-B ../sdl2_build
- Start build process of 3Rd dependency :
cd ../ # corresponds to ./external/sources
# option 1
cmake --build ./sdl2_build -v
# option 2
cd ./sdl2_build
make -j7
- Start install process of 3Rd dependency :
cd ../ # correspond to ./external directory
# option 1
cmake --install ./sources/sdl2_build --prefix sdl2
# option 2
cd ./sources/sdl2_build
make install
If you dont want build the 3Rd dependencies from source and have binaries of the 3Rd dependency, just create new folder in the
./external/
dir and put them here.
- Use the
bake.sh
file for developement. - Purpose of the
bake.sh
file is handling all build, install and packing procedures in isolated directory named asout/
. CMAKE_INSTALL_PREFIX
option is modified to install targets in/out
directory.
- Write your code.
- Edit the
CMakeLists.txt
file for proper linking, compiling and installing. - Run the
bake.sh
file.
- After your development is done, you can follow the steps below to build and pack your application.
# run this command at the root directory of the project
cmake -S . -B ./out/build
# option 1 : building by cmake
cd ./out/build && cmake --build . -v
# option 2 : building by make itself
# ( there is no any major difference between option1 and option 2)
cd ./out/build && make
# alternatively you can use -j parameters with make command to speed up build process
cd ./out/build && make -j7
The project will configured to install common unix install directories like : usr/slare/local
, /usr/local
etc.
you may require run install commands by
sudo
, because installing process will install your project to the one of the root directories.
# option 1 :
cd ./out/build && cmake --install .
# option 2 :
cd ./out/build && make install
cd ./out/build && cpack -C Release