mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-22 21:04:18 +08:00
openjk: add recipe
This commit is contained in:
parent
82d5db1b95
commit
6abcbb4a63
54
recipes/openjk/recipe.toml
Normal file
54
recipes/openjk/recipe.toml
Normal file
@ -0,0 +1,54 @@
|
||||
[source]
|
||||
git = "https://github.com/jackpot51/OpenJK"
|
||||
upstream = "https://github.com/JACoders/OpenJK.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"libjpeg",
|
||||
"liborbital",
|
||||
"libpng",
|
||||
"llvm",
|
||||
"mesa",
|
||||
"sdl2",
|
||||
"zlib",
|
||||
]
|
||||
script = """
|
||||
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
|
||||
cat > redox.cmake <<EOF
|
||||
# the name of the target operating system
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
|
||||
# which compilers to use for C and C++
|
||||
set(CMAKE_C_COMPILER "${TARGET}-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${TARGET}-g++")
|
||||
|
||||
# where is the target environment located
|
||||
set(CMAKE_FIND_ROOT_PATH "${COOKBOOK_SYSROOT}")
|
||||
|
||||
# adjust the default behavior of the FIND_XXX() commands:
|
||||
# search programs in the host environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# search headers and libraries in the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
EOF
|
||||
COOKBOOK_CONFIGURE="cmake"
|
||||
COOKBOOK_CONFIGURE_FLAGS=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX="/"
|
||||
-DCMAKE_TOOLCHAIN_FILE=redox.cmake
|
||||
-DCMAKE_VERBOSE_MAKEFILE=On
|
||||
-DJPEG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DJPEG_LIBRARY="-ljpeg"
|
||||
-DPNG_PNG_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DPNG_LIBRARY="-lpng"
|
||||
-DSDL2_LIBRARIES="-lSDL2 -lorbital $("${TARGET}-pkg-config" --libs osmesa)"
|
||||
-DZLIB_INCLUDE_DIR="${COOKBOOK_SYSROOT}/include"
|
||||
-DZLIB_LIBRARY="-lz"
|
||||
"${COOKBOOK_SOURCE}"
|
||||
)
|
||||
cookbook_configure
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user