mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-02-04 17:19:09 +00:00
feat(gx): add incomplete 'CGxDeviceGLSDL' (#2)
* chore(build): add vendored SDL 3.0.0 library * chore(build): add vendored glew-cmake-2.2.0 library * feat(console): in the presence of -opengl launch flag, change GxApi to OpenGl * feat(gx): add uncompleted CGxDeviceGLSDL targeting Windows and Linux * chore(build): change SDL3 linkage from shared (bad) to to static (good)
This commit is contained in:
parent
934e0fb600
commit
706c8903a1
2043 changed files with 663533 additions and 5 deletions
71
vendor/glew-cmake-2.2.0/cmake-testbuild.sh
vendored
Normal file
71
vendor/glew-cmake-2.2.0/cmake-testbuild.sh
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script tests the CMake build:
|
||||
#
|
||||
# - builds the main CMakeLists.txt
|
||||
# - builds and runs a small test app in a separate build tree so
|
||||
# the config-module is tested, too
|
||||
#
|
||||
# Options (environment variables):
|
||||
#
|
||||
# - The variable BUILD_SHARED_LIBS will be forwarded to the CMake project
|
||||
# that builds and installs the GLEW libraries. Set BUILD_SHARED_LIBS to
|
||||
# ON or OFF to install only static or shared libs. Leave it unset to
|
||||
# install both.
|
||||
#
|
||||
# Note: BUILD_SHARED_LIBS controls only what to install not what to build.
|
||||
#
|
||||
# - GLEW_USE_STATIC_LIBS will be forwarded to the test project that calls
|
||||
# `find_package` to find GLEW. Set GLEW_USE_STATIC LIBS to ON or OFF force
|
||||
# finding the shared or static versions of GLEW. Leave it unset to find
|
||||
# the shared or what is available.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# Build & install shared + static, find default (shared)
|
||||
#
|
||||
# ./cmake-testbuild.sh
|
||||
#
|
||||
# Build & install shared + static, find static
|
||||
#
|
||||
# GLEW_USE_STATIC_LIBS=ON ./cmake-testbuild.sh
|
||||
#
|
||||
# Install static only (still build both)
|
||||
#
|
||||
# BUILD_SHARED_LIBS=OFF ./cmake-testbuild.sh
|
||||
#
|
||||
|
||||
set -ex
|
||||
|
||||
rm -rf out/include
|
||||
rm -rf out/lib*
|
||||
rm -rf out/bin
|
||||
|
||||
if [ -n "$BUILD_SHARED_LIBS" ]; then
|
||||
bsl=-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS
|
||||
else
|
||||
bsl=-UBUILD_SHARED_LIBS
|
||||
fi
|
||||
|
||||
if [ -n "$GLEW_USE_STATIC_LIBS" ]; then
|
||||
gusl=-DGLEW_USE_STATIC_LIBS=$GLEW_USE_STATIC_LIBS
|
||||
else
|
||||
gusl=-UGLEW_USE_STATIC_LIBS
|
||||
fi
|
||||
|
||||
cmake -Hbuild/cmake -Bout/build/glew -DCMAKE_INSTALL_PREFIX=${PWD}/out -DCMAKE_BUILD_TYPE=Debug $bsl
|
||||
cmake --build out/build/glew --target install --config Debug
|
||||
cmake out/build/glew -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build out/build/glew --target install --config Release --clean-first
|
||||
|
||||
cmake -Hbuild/cmake/testbuild -Bout/build/cmake-testbuild -DCMAKE_INSTALL_PREFIX=${PWD}/out -DCMAKE_PREFIX_PATH=${PWD}/out -DCMAKE_BUILD_TYPE=Debug $gusl
|
||||
cmake --build out/build/cmake-testbuild --target install --config Debug
|
||||
|
||||
cmake out/build/cmake-testbuild -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build out/build/cmake-testbuild --target install --config Release --clean-first
|
||||
|
||||
export LD_LIBRARY_PATH=${PWD}/out/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=${PWD}/out/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
out/bin/cmake-test_d
|
||||
out/bin/cmake-test
|
||||
Loading…
Add table
Add a link
Reference in a new issue