Builds on knulli
This commit is contained in:
40
cmake/targets/knulli.cmake
Normal file
40
cmake/targets/knulli.cmake
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Find link platform-specific libraries
|
||||||
|
find_package(SDL2 REQUIRED)
|
||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
|
# Setup endianess at compile time to optimize.
|
||||||
|
include(TestBigEndian)
|
||||||
|
test_big_endian(IS_BIG_ENDIAN)
|
||||||
|
if(IS_BIG_ENDIAN)
|
||||||
|
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
|
DUSK_PLATFORM_ENDIAN_BIG
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
|
DUSK_PLATFORM_ENDIAN_LITTLE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Link required libraries.
|
||||||
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
|
SDL2
|
||||||
|
pthread
|
||||||
|
OpenGL::GL
|
||||||
|
GL
|
||||||
|
m
|
||||||
|
)
|
||||||
|
|
||||||
|
# Define platform-specific macros.
|
||||||
|
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
|
DUSK_SDL2
|
||||||
|
DUSK_OPENGL
|
||||||
|
DUSK_LINUX
|
||||||
|
DUSK_DISPLAY_SIZE_DYNAMIC
|
||||||
|
DUSK_DISPLAY_WIDTH_DEFAULT=640
|
||||||
|
DUSK_DISPLAY_HEIGHT_DEFAULT=480
|
||||||
|
DUSK_DISPLAY_SCREEN_HEIGHT=240
|
||||||
|
DUSK_INPUT_KEYBOARD
|
||||||
|
DUSK_INPUT_POINTER
|
||||||
|
DUSK_INPUT_GAMEPAD
|
||||||
|
DUSK_TIME_DYNAMIC
|
||||||
|
)
|
||||||
5
cmake/targets/rg35xxh.cmake
Normal file
5
cmake/targets/rg35xxh.cmake
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
include(cmake/targets/knulli.cmake)
|
||||||
|
|
||||||
|
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
||||||
|
DUSK_RG35XXH
|
||||||
|
)
|
||||||
29
cmake/toolchains/aarch64-linux-gnu.cmake
Normal file
29
cmake/toolchains/aarch64-linux-gnu.cmake
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
|
||||||
|
set(CMAKE_ASM_COMPILER aarch64-linux-gnu-gcc)
|
||||||
|
|
||||||
|
set(CMAKE_SYSROOT /)
|
||||||
|
set(CMAKE_C_COMPILER_TARGET aarch64-linux-gnu)
|
||||||
|
set(CMAKE_CXX_COMPILER_TARGET aarch64-linux-gnu)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH
|
||||||
|
/usr/aarch64-linux-gnu
|
||||||
|
/usr/lib/aarch64-linux-gnu
|
||||||
|
/usr/include/aarch64-linux-gnu
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
|
|
||||||
|
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig")
|
||||||
|
set(ENV{PKG_CONFIG_PATH} "/usr/lib/aarch64-linux-gnu/pkgconfig")
|
||||||
|
|
||||||
|
set(CMAKE_PREFIX_PATH "/usr/aarch64-linux-gnu;/usr/lib/aarch64-linux-gnu")
|
||||||
|
|
||||||
|
# Optional: helps some Find modules
|
||||||
|
set(SDL2_DIR "/usr/lib/aarch64-linux-gnu/cmake/SDL2" CACHE PATH "")
|
||||||
31
docker/knulli/Dockerfile
Normal file
31
docker/knulli/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM debian:bookworm
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
WORKDIR /workdir
|
||||||
|
RUN dpkg --add-architecture arm64 && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
crossbuild-essential-arm64 \
|
||||||
|
ca-certificates \
|
||||||
|
pkg-config \
|
||||||
|
cmake \
|
||||||
|
make \
|
||||||
|
ninja-build \
|
||||||
|
git \
|
||||||
|
file \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-polib \
|
||||||
|
python3-pil \
|
||||||
|
python3-dotenv \
|
||||||
|
python3-pyqt5 \
|
||||||
|
python3-opengl \
|
||||||
|
liblua5.3-dev:arm64 \
|
||||||
|
xz-utils:arm64 \
|
||||||
|
libbz2-dev:arm64 \
|
||||||
|
zlib1g-dev:arm64 \
|
||||||
|
libzip-dev:arm64 \
|
||||||
|
libbz2-dev:arm64 \
|
||||||
|
libssl-dev:arm64 \
|
||||||
|
libsdl2-dev:arm64 \
|
||||||
|
libgl1-mesa-dev:arm64 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
3
scripts/build-rg35xxh-docker.sh
Executable file
3
scripts/build-rg35xxh-docker.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker build -t dusk-rg35xxh -f docker/knulli/Dockerfile .
|
||||||
|
docker run --rm -v $(pwd):/workdir dusk-rg35xxh /bin/bash -c "./scripts/build-rg35xxh.sh"
|
||||||
7
scripts/build-rg35xxh.sh
Executable file
7
scripts/build-rg35xxh.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cmake -S . -B build-rg35xxh -G Ninja \
|
||||||
|
-DDUSK_BUILD_TESTS=ON \
|
||||||
|
-DDUSK_TARGET_SYSTEM=rg35xxh \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=./cmake/toolchains/aarch64-linux-gnu.cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build build-rg35xxh -- -j$(nproc)
|
||||||
@@ -10,6 +10,11 @@ if(DUSK_TARGET_SYSTEM STREQUAL "linux")
|
|||||||
add_subdirectory(dusksdl2)
|
add_subdirectory(dusksdl2)
|
||||||
add_subdirectory(duskgl)
|
add_subdirectory(duskgl)
|
||||||
|
|
||||||
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "rg35xxh")
|
||||||
|
add_subdirectory(dusklinux)
|
||||||
|
add_subdirectory(dusksdl2)
|
||||||
|
add_subdirectory(duskgl)
|
||||||
|
|
||||||
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
add_subdirectory(duskpsp)
|
add_subdirectory(duskpsp)
|
||||||
add_subdirectory(dusksdl2)
|
add_subdirectory(dusksdl2)
|
||||||
|
|||||||
Reference in New Issue
Block a user