mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge public master
This commit is contained in:
commit
6fc6e8336c
22 changed files with 509 additions and 320 deletions
3
.gitattributes
vendored
3
.gitattributes
vendored
|
|
@ -20,6 +20,9 @@
|
||||||
*.csproj* -crlf -whitespace
|
*.csproj* -crlf -whitespace
|
||||||
*.vcxproj* -crlf -whitespace
|
*.vcxproj* -crlf -whitespace
|
||||||
*.manifest -crlf -whitespace
|
*.manifest -crlf -whitespace
|
||||||
|
# vcpkg
|
||||||
|
/vcpkg.json text=auto
|
||||||
|
/vcpkg-configuration.json text=auto
|
||||||
# Patches
|
# Patches
|
||||||
/tools/SDL-1.2.14-gc/SDL-1.2.14-gc.patch -whitespace
|
/tools/SDL-1.2.14-gc/SDL-1.2.14-gc.patch -whitespace
|
||||||
#Appveyor
|
#Appveyor
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Alpine 3 GCC Dedicated:
|
||||||
- - |
|
- - |
|
||||||
# apk_development
|
# apk_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apk add cmake musl-dev sdl2_mixer-dev libpng-dev curl-dev libgme-dev libopenmpt-dev miniupnpc-dev elfutils-dev
|
- apk add cmake musl-dev sdl2-dev libpng-dev curl-dev miniupnpc-dev elfutils-dev
|
||||||
- |
|
- |
|
||||||
# apk_development
|
# apk_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||||
|
|
@ -28,7 +28,14 @@ Alpine 3 GCC Dedicated:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_DEDICATED=ON
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DSRB2_CONFIG_EXECINFO=NO \
|
||||||
|
-DSRB2_CONFIG_DEDICATED=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -59,26 +59,24 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# ccache_config
|
# ccache_config
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||||
- mkdir --parents --verbose ~/.ccache/
|
|
||||||
- touch ~/.ccache/ccache.conf
|
|
||||||
- |
|
- |
|
||||||
# cache.conf
|
# cache.conf
|
||||||
echo Adding ccache configution option
|
echo Adding ccache configution option
|
||||||
- |
|
- |
|
||||||
# base_dir
|
# base_dir
|
||||||
echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf
|
ccache --set-config base_dir=$CI_PROJECT_DIR
|
||||||
- |
|
- |
|
||||||
# cache_dir
|
# cache_dir
|
||||||
echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf
|
ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache
|
||||||
- |
|
- |
|
||||||
# compiler_check
|
# compiler_check
|
||||||
echo compiler_check = content | tee -a ~/.ccache/ccache.conf
|
ccache --set-config compiler_check=content
|
||||||
- |
|
- |
|
||||||
# stats_log
|
# stats_log
|
||||||
echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf
|
ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog
|
||||||
- |
|
- |
|
||||||
# max_size
|
# max_size
|
||||||
echo max_size = 50M | tee -a ~/.ccache/ccache.conf
|
ccache --set-config max_size=300M
|
||||||
- |
|
- |
|
||||||
# ccache_config
|
# ccache_config
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||||
|
|
@ -104,7 +102,7 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# apk_development
|
# apk_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apk_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apk add cmake musl-dev sdl2_mixer-dev libpng-dev curl-dev libgme-dev libopenmpt-dev miniupnpc-dev elfutils-dev
|
- apk add cmake musl-dev sdl2-dev libpng-dev curl-dev miniupnpc-dev elfutils-dev
|
||||||
- |
|
- |
|
||||||
# apk_development
|
# apk_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apk_development\r\e[0K"
|
||||||
|
|
@ -112,7 +110,13 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DSRB2_CONFIG_EXECINFO=NO
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -120,7 +124,7 @@ Alpine 3 GCC:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
batocera:arm64:
|
batocera:arm64:
|
||||||
extends: Debian stable:arm64
|
extends: Debian stable:arm64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
@ -24,7 +26,7 @@ batocera:arm64:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
- apt-get install libsdl2-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libyuv-dev:arm64 libminiupnpc-dev:arm64
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -32,7 +34,13 @@ batocera:arm64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -40,7 +48,7 @@ batocera:arm64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:amd64:
|
Debian oldstable:amd64:
|
||||||
extends: Debian stable:amd64
|
extends: Debian stable:amd64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
|
@ -26,7 +28,7 @@ Debian oldstable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
- apt-get install libsdl2-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libminiupnpc-dev:amd64
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -34,7 +36,15 @@ Debian oldstable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG" \
|
||||||
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG"
|
||||||
|
-DSRB2_CONFIG_DEV_BUILD=ON \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -42,7 +52,7 @@ Debian oldstable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
Debian oldstable:arm64:
|
Debian oldstable:arm64:
|
||||||
extends: Debian stable:arm64
|
extends: Debian stable:arm64
|
||||||
|
|
||||||
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable
|
||||||
|
|
@ -26,7 +28,7 @@ Debian oldstable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
- apt-get install libsdl2-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libminiupnpc-dev:arm64
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -34,7 +36,16 @@ Debian oldstable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG" \
|
||||||
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O3 -g -DNDEBUG"
|
||||||
|
-DSRB2_CONFIG_DEV_BUILD=ON \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -42,7 +53,7 @@ Debian oldstable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ Debian stable:amd64:
|
||||||
variables:
|
variables:
|
||||||
CC: x86_64-linux-gnu-gcc
|
CC: x86_64-linux-gnu-gcc
|
||||||
CXX: x86_64-linux-gnu-g++
|
CXX: x86_64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: x86_64-linux-gnu-objcopy
|
OBJCOPY: x86_64-linux-gnu-objcopy
|
||||||
OBJDUMP: x86_64-linux-gnu-objdump
|
OBJDUMP: x86_64-linux-gnu-objdump
|
||||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
||||||
|
|
@ -32,7 +31,7 @@ Debian stable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64 libminiupnpc-dev:amd64
|
- apt-get install libsdl2-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libyuv-dev:amd64 libminiupnpc-dev:amd64
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -41,10 +40,10 @@ Debian stable:amd64:
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- |
|
- |
|
||||||
CCACHE=$(which ccache)
|
cmake \
|
||||||
cmake -B build.cmake \
|
--preset ninja-debug \
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=$CCACHE \
|
-B build.cmake \
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE \
|
-G "Unix Makefiles" \
|
||||||
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
|
|
@ -53,7 +52,7 @@ Debian stable:amd64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ Debian stable:arm64:
|
||||||
variables:
|
variables:
|
||||||
CC: aarch64-linux-gnu-gcc
|
CC: aarch64-linux-gnu-gcc
|
||||||
CXX: aarch64-linux-gnu-g++
|
CXX: aarch64-linux-gnu-g++
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
OBJCOPY: aarch64-linux-gnu-objcopy
|
OBJCOPY: aarch64-linux-gnu-objcopy
|
||||||
OBJDUMP: aarch64-linux-gnu-objdump
|
OBJDUMP: aarch64-linux-gnu-objdump
|
||||||
LD: aarch64-linux-gnu-ld
|
LD: aarch64-linux-gnu-ld
|
||||||
|
|
@ -33,7 +32,7 @@ Debian stable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libgme-dev:arm64 libopenmpt-dev:arm64 libminiupnpc-dev:arm64
|
- apt-get install libsdl2-dev:arm64 libpng-dev:arm64 libcurl4-openssl-dev:arm64 libyuv-dev:arm64 libminiupnpc-dev:arm64
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -41,7 +40,13 @@ Debian stable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -49,7 +54,7 @@ Debian stable:arm64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ Debian stable Clang:
|
||||||
|
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
when: manual
|
when: on_success
|
||||||
|
|
||||||
allow_failure: true
|
allow_failure: false
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
|
@ -16,10 +16,9 @@ Debian stable Clang:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang
|
CXX: clang++
|
||||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Wno-error=parentheses-equality -Wno-error=misleading-indentation -Wno-error=fortify-source -Werror
|
||||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror
|
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Wno-error=parentheses-equality -Wno-error=misleading-indentation -Wno-error=fortify-source -Werror
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
||||||
|
|
@ -33,7 +32,7 @@ Debian stable Clang:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
- apt-get install libsdl2-dev libpng-dev libcurl4-openssl-dev libyuv-dev libminiupnpc-dev
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -41,7 +40,15 @@ Debian stable Clang:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DCPM_USE_LOCAL_PACKAGES:BOOL=ON \
|
||||||
|
-DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF \
|
||||||
|
-DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -49,7 +56,7 @@ Debian stable Clang:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Debian stable:i386:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386 libminiupnpc-dev:i386
|
- apt-get install libsdl2-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libyuv-dev:i386 libminiupnpc-dev:i386
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -40,7 +40,12 @@ Debian stable:i386:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -48,7 +53,7 @@ Debian stable:i386:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,7 @@ Debian testing Clang:
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "build.clang/bin/"
|
- "build.cmake/bin/"
|
||||||
- "build.clang/src/config.h"
|
- "build.cmake/src/config.h"
|
||||||
expose_as: "testing-clang"
|
expose_as: "testing-clang"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||||
|
|
||||||
variables:
|
|
||||||
CC: clang
|
|
||||||
CXX: clang
|
|
||||||
WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
|
||||||
CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion
|
|
||||||
LDFLAGS: -Wl,-fuse-ld=gold
|
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,8 @@ Debian testing GCC:
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-gcc"
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CC: /usr/bin/x86_64-linux-gnu-gcc
|
CC: gcc
|
||||||
CXX: /usr/bin/x86_64-linux-gnu-g++
|
CXX: g++
|
||||||
OBJCOPY: /usr/bin/x86_64-linux-gnu-objcopy
|
|
||||||
OBJDUMP: /usr/bin/x86_64-linux-gnu-objdump
|
|
||||||
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
|
|
||||||
LD: /usr/bin/x86_64-linux-gnu-ld
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- - |
|
- - |
|
||||||
|
|
@ -36,7 +32,7 @@ Debian testing GCC:
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- apt-get install libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev libminiupnpc-dev
|
- apt-get install libsdl2-dev libpng-dev libcurl4-openssl-dev libyuv-dev libminiupnpc-dev
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
|
||||||
|
|
@ -44,7 +40,12 @@ Debian testing GCC:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||||
|
|
@ -52,7 +53,7 @@ Debian testing GCC:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,6 @@ osxcross arm64:
|
||||||
- build/apt-cache
|
- build/apt-cache
|
||||||
unprotect: true
|
unprotect: true
|
||||||
|
|
||||||
- key: vcpkg-root
|
|
||||||
paths:
|
|
||||||
- build/vcpkg-root
|
|
||||||
unprotect: true
|
|
||||||
|
|
||||||
- key: vcpkg-binary-cache-arm64-osx
|
- key: vcpkg-binary-cache-arm64-osx
|
||||||
paths:
|
paths:
|
||||||
- build/vcpkg-binary-cache
|
- build/vcpkg-binary-cache
|
||||||
|
|
@ -32,40 +27,32 @@ osxcross arm64:
|
||||||
- "build.arm64/bin/"
|
- "build.arm64/bin/"
|
||||||
- "build.arm64/dist/arm64.h"
|
- "build.arm64/dist/arm64.h"
|
||||||
- "build.arm64/src/config.h"
|
- "build.arm64/src/config.h"
|
||||||
expose_as: "Mac arm64"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4"
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
OSXCROSS_HOST: arm64-apple-darwin21.4
|
CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake
|
||||||
LD: arm64-apple-darwin21.4-ld
|
CCACHE_CPP2: yes
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- |
|
- - |
|
||||||
# vcpkg
|
# osxcross Config
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg"
|
echo -e "\e[0Ksection_start:`date +%s`:osxcross_Config[collapsed=true]\r\e[0Kosxcross Config"
|
||||||
|
- export VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${OSXCROSS_TARGET_DIR}/toolchain.cmake
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
- export PATH="/opt/osxcross.arm64:${PATH}"
|
||||||
pushd build/vcpkg-root
|
- $(osxcross-conf)
|
||||||
git fetch https://github.com/Microsoft/vcpkg master
|
- export OSXCROSS_HOST=arm64-apple-${OSXCROSS_TARGET}
|
||||||
git reset --hard FETCH_HEAD
|
- export VCPKG_DEFAULT_TRIPLET=arm64-osx
|
||||||
popd
|
- export CC=${OSXCROSS_TARGET_DIR}/bin/${OSXCROSS_HOST}-clang
|
||||||
else
|
- export CXX=${OSXCROSS_TARGET_DIR}/bin/${OSXCROSS_HOST}-clang++
|
||||||
mkdir -p build
|
- export SDKROOT=${OSXCROSS_SDK}
|
||||||
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
|
- |
|
||||||
fi
|
# osxcross Config
|
||||||
|
echo -e "\e[0Ksection_end:`date +%s`:osxcross_Config\r\e[0K"
|
||||||
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
|
|
||||||
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
|
||||||
|
|
||||||
mkdir -p "build/vcpkg-binary-cache"
|
|
||||||
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile
|
- osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl libpng
|
||||||
- osxcross-macports install --static --arm64 curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 curl libsdl2_mixer libpng
|
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||||
|
|
@ -73,7 +60,21 @@ osxcross arm64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_SDL2_EXE_NAME=ringracers_$CI_PIPELINE_ID
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.arm64 \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DCPM_USE_LOCAL_PACKAGES:BOOL=ON \
|
||||||
|
-DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" \
|
||||||
|
-DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF \
|
||||||
|
-DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON \
|
||||||
|
-DSRB2_SDL2_EXE_NAME=ringracers_$CI_PIPELINE_ID \
|
||||||
|
-DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
@ -81,7 +82,7 @@ osxcross arm64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.arm64 --parallel 1 --verbose
|
- cmake --build build.arm64 --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
@ -93,35 +94,4 @@ osxcross arm64:
|
||||||
- cp --reflink=auto --sparse=always --verbose build.arm64/src/config.h build.arm64/dist/arm64.h
|
- cp --reflink=auto --sparse=always --verbose build.arm64/src/config.h build.arm64/dist/arm64.h
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
|
||||||
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- - |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
|
||||||
- apt-get autoclean
|
|
||||||
- |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# vcpkg_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
|
|
||||||
|
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
|
||||||
pushd "build/vcpkg-root"
|
|
||||||
git clean
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# ccache_stats
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
|
||||||
- ccache --show-stats
|
|
||||||
- ccache --show-log-stats || true
|
|
||||||
- |
|
|
||||||
# ccahe_stats
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
|
||||||
|
|
@ -17,11 +17,6 @@ osxcross x86_64:
|
||||||
- build/apt-cache
|
- build/apt-cache
|
||||||
unprotect: true
|
unprotect: true
|
||||||
|
|
||||||
- key: vcpkg-root
|
|
||||||
paths:
|
|
||||||
- build/vcpkg-root
|
|
||||||
unprotect: true
|
|
||||||
|
|
||||||
- key: vcpkg-binary-cache-x64-osx
|
- key: vcpkg-binary-cache-x64-osx
|
||||||
paths:
|
paths:
|
||||||
- build/vcpkg-binary-cache
|
- build/vcpkg-binary-cache
|
||||||
|
|
@ -32,40 +27,32 @@ osxcross x86_64:
|
||||||
- "build.x86_64/bin/"
|
- "build.x86_64/bin/"
|
||||||
- "build.x86_64/dist/x86_64.h"
|
- "build.x86_64/dist/x86_64.h"
|
||||||
- "build.x86_64/src/config.h"
|
- "build.x86_64/src/config.h"
|
||||||
expose_as: "Mac x86_64"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4"
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
OSXCROSS_HOST: x86_64-apple-darwin21.4
|
CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake
|
||||||
LD: x86_64-apple-darwin21.4-ld
|
CCACHE_CPP2: yes
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- |
|
- - |
|
||||||
# vcpkg
|
# osxcross Config
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg"
|
echo -e "\e[0Ksection_start:`date +%s`:osxcross_Config[collapsed=true]\r\e[0Kosxcross Config"
|
||||||
|
- export VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${OSXCROSS_TARGET_DIR}/toolchain.cmake
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
- export PATH="/opt/osxcross.x86_64:${PATH}"
|
||||||
pushd build/vcpkg-root
|
- $(osxcross-conf)
|
||||||
git fetch https://github.com/Microsoft/vcpkg master
|
- export OSXCROSS_HOST=x86_64-apple-${OSXCROSS_TARGET}
|
||||||
git reset --hard FETCH_HEAD
|
- export VCPKG_DEFAULT_TRIPLET=x64-osx
|
||||||
popd
|
- export CC=${OSXCROSS_TARGET_DIR}/bin/${OSXCROSS_HOST}-clang
|
||||||
else
|
- export CXX=${OSXCROSS_TARGET_DIR}/bin/${OSXCROSS_HOST}-clang++
|
||||||
mkdir -p build
|
- export SDKROOT=${OSXCROSS_SDK}
|
||||||
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
|
- |
|
||||||
fi
|
# osxcross Config
|
||||||
|
echo -e "\e[0Ksection_end:`date +%s`:osxcross_Config\r\e[0K"
|
||||||
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
|
|
||||||
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
|
||||||
|
|
||||||
mkdir -p "build/vcpkg-binary-cache"
|
|
||||||
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
- - |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||||
- osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile
|
- osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl libpng
|
||||||
- osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng
|
|
||||||
- |
|
- |
|
||||||
# apt_development
|
# apt_development
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||||
|
|
@ -73,7 +60,20 @@ osxcross x86_64:
|
||||||
- - |
|
- - |
|
||||||
# cmake
|
# cmake
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_SDL2_EXE_NAME=ringracers_$CI_PIPELINE_ID
|
- |
|
||||||
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
|
-B build.x86_64 \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
|
-DCPM_USE_LOCAL_PACKAGES:BOOL=ON \
|
||||||
|
-DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" \
|
||||||
|
-DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" \
|
||||||
|
-DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF \
|
||||||
|
-DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON \
|
||||||
|
-DSRB2_SDL2_EXE_NAME=ringracers_$CI_PIPELINE_ID \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
@ -81,7 +81,7 @@ osxcross x86_64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.x86_64 --parallel 1 --verbose
|
- cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
@ -93,35 +93,4 @@ osxcross x86_64:
|
||||||
- cp --reflink=auto --sparse=always --verbose build.x86_64/src/config.h build.x86_64/dist/x86_64.h
|
- cp --reflink=auto --sparse=always --verbose build.x86_64/src/config.h build.x86_64/dist/x86_64.h
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K"
|
||||||
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- - |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
|
||||||
- apt-get autoclean
|
|
||||||
- |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# vcpkg_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
|
|
||||||
|
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
|
||||||
pushd "build/vcpkg-root"
|
|
||||||
git clean
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# ccache_stats
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
|
||||||
- ccache --show-stats
|
|
||||||
- ccache --show-log-stats || true
|
|
||||||
- |
|
|
||||||
# ccahe_stats
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
|
||||||
|
|
@ -9,6 +9,25 @@ Windows x64:
|
||||||
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
|
||||||
|
fallback_keys:
|
||||||
|
- ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
|
||||||
|
- ccache-$CI_JOB_NAME_SLUG-master
|
||||||
|
paths:
|
||||||
|
- build/ccache
|
||||||
|
- build/ccache_statslog
|
||||||
|
|
||||||
|
- key: apt-$CI_JOB_IMAGE
|
||||||
|
paths:
|
||||||
|
- build/apt-cache
|
||||||
|
unprotect: true
|
||||||
|
|
||||||
|
- key: vcpkg-binary-cache-x64-mingw-static
|
||||||
|
paths:
|
||||||
|
- build/vcpkg-binary-cache
|
||||||
|
unprotect: true
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "build.cmake/bin/"
|
- "build.cmake/bin/"
|
||||||
|
|
@ -17,11 +36,22 @@ Windows x64:
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
PREFIX: x86_64-w64-mingw32
|
VCPKG_TARGET_TRIPLET: x64-mingw-static
|
||||||
CC: /usr/lib/ccache/x86_64-w64-mingw32-gcc-12-posix
|
CC: x86_64-w64-mingw32-gcc
|
||||||
CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++
|
CXX: x86_64-w64-mingw32-g++
|
||||||
|
LD: x86_64-w64-mingw32-ld
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- |
|
||||||
|
# vcpkg
|
||||||
|
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache"
|
||||||
|
|
||||||
|
export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache"
|
||||||
|
|
||||||
|
mkdir -p "build/vcpkg-binary-cache"
|
||||||
|
|
||||||
|
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
|
||||||
|
|
||||||
- - |
|
- - |
|
||||||
# apt_toolchain
|
# apt_toolchain
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
|
||||||
|
|
@ -43,16 +73,14 @@ Windows x64:
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- |
|
- |
|
||||||
cmake \
|
cmake \
|
||||||
|
--preset ninja-debug \
|
||||||
-B build.cmake \
|
-B build.cmake \
|
||||||
-G "Unix Makefiles" \
|
-G "Unix Makefiles" \
|
||||||
-DSRB2_USE_CCACHE=NO \
|
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/x86_64-w64-mingw32-gcc-12-posix \
|
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/x86_64-w64-mingw32-g++ \
|
|
||||||
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake \
|
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake \
|
||||||
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF \
|
-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DVCPKG_TARGET_TRIPLET=x64-mingw-static \
|
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
|
||||||
-DSRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK=ON
|
-DSRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
|
|
@ -61,7 +89,7 @@ Windows x64:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build build.cmake --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,6 @@ Windows x86:
|
||||||
- build/apt-cache
|
- build/apt-cache
|
||||||
unprotect: true
|
unprotect: true
|
||||||
|
|
||||||
- key: vcpkg-root
|
|
||||||
paths:
|
|
||||||
- build/vcpkg-root
|
|
||||||
unprotect: true
|
|
||||||
|
|
||||||
- key: vcpkg-binary-cache-x86-mingw-static
|
- key: vcpkg-binary-cache-x86-mingw-static
|
||||||
paths:
|
paths:
|
||||||
- build/vcpkg-binary-cache
|
- build/vcpkg-binary-cache
|
||||||
|
|
@ -33,33 +28,23 @@ Windows x86:
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "build/ninja-x86_mingw_static_vcpkg-debug/bin/"
|
- "build.cmake/bin/"
|
||||||
- "build/ninja-x86_mingw_static_vcpkg-debug/src/config.h"
|
- "build.cmake/src/config.h"
|
||||||
expose_as: "Win32"
|
expose_as: "Win32"
|
||||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
PREFIX: i686-w64-mingw32
|
VCPKG_TARGET_TRIPLET: x86-mingw-static
|
||||||
CC: /usr/lib/ccache/i686-w64-mingw32-gcc-12-posix
|
CC: i686-w64-mingw32-gcc
|
||||||
CXX: /usr/lib/ccache/i686-w64-mingw32-g++
|
CXX: i686-w64-mingw32-g++
|
||||||
|
LD: i686-w64-mingw32-ld
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
# vcpkg
|
# vcpkg
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg"
|
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache"
|
||||||
|
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache"
|
||||||
pushd build/vcpkg-root
|
|
||||||
git fetch https://github.com/Microsoft/vcpkg master
|
|
||||||
git reset --hard FETCH_HEAD
|
|
||||||
popd
|
|
||||||
else
|
|
||||||
mkdir -p build
|
|
||||||
git clone https://github.com/Microsoft/vcpkg build/vcpkg-root
|
|
||||||
fi
|
|
||||||
|
|
||||||
export VCPKG_ROOT=$(pwd)/build/vcpkg-root
|
|
||||||
export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite"
|
|
||||||
|
|
||||||
mkdir -p "build/vcpkg-binary-cache"
|
mkdir -p "build/vcpkg-binary-cache"
|
||||||
|
|
||||||
|
|
@ -86,16 +71,14 @@ Windows x86:
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||||
- |
|
- |
|
||||||
cmake \
|
cmake \
|
||||||
--preset ninja-x86_mingw_static_vcpkg-debug \
|
--preset ninja-debug \
|
||||||
|
-B build.cmake \
|
||||||
-G "Unix Makefiles" \
|
-G "Unix Makefiles" \
|
||||||
-DSRB2_USE_CCACHE=NO \
|
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/i686-w64-mingw32-gcc-12-posix \
|
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/i686-w64-mingw32-g++ \
|
|
||||||
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake \
|
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake \
|
||||||
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
-DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF \
|
||||||
-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF \
|
-DSRB2_CONFIG_ENABLE_DISCORDRPC=OFF \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
|
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
|
||||||
-DVCPKG_TARGET_TRIPLET=x86-mingw-static \
|
-DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} \
|
||||||
-DSRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK=ON
|
-DSRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK=ON
|
||||||
- |
|
- |
|
||||||
# cmake
|
# cmake
|
||||||
|
|
@ -104,37 +87,7 @@ Windows x86:
|
||||||
- - |
|
- - |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||||
- cmake --build --preset ninja-x86_mingw_static_vcpkg-debug --parallel 1 --verbose
|
- cmake --build build.cmake --parallel 1 --verbose -- --keep-going
|
||||||
- |
|
- |
|
||||||
# make
|
# make
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||||
|
|
||||||
after_script:
|
|
||||||
- - |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
|
|
||||||
- apt-get autoclean
|
|
||||||
- |
|
|
||||||
# apt_clean
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# vcpkg_clean
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root"
|
|
||||||
|
|
||||||
if [ -d "build/vcpkg-root" ]; then
|
|
||||||
pushd "build/vcpkg-root"
|
|
||||||
git clean -f
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K"
|
|
||||||
|
|
||||||
- - |
|
|
||||||
# ccache_stats
|
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
|
|
||||||
- ccache --show-stats
|
|
||||||
- ccache --show-log-stats || true
|
|
||||||
- |
|
|
||||||
# ccahe_stats
|
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"
|
|
||||||
|
|
|
||||||
|
|
@ -96,26 +96,24 @@
|
||||||
- - |
|
- - |
|
||||||
# ccache_config
|
# ccache_config
|
||||||
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config"
|
||||||
- mkdir --parents --verbose ~/.ccache/
|
|
||||||
- touch ~/.ccache/ccache.conf
|
|
||||||
- |
|
- |
|
||||||
# cache.conf
|
# cache.conf
|
||||||
echo Adding ccache configution option
|
echo Adding ccache configution option
|
||||||
- |
|
- |
|
||||||
# base_dir
|
# base_dir
|
||||||
echo base_dir = $CI_PROJECT_DIR | tee --append ~/.ccache/ccache.conf
|
ccache --set-config base_dir=$CI_PROJECT_DIR
|
||||||
- |
|
- |
|
||||||
# cache_dir
|
# cache_dir
|
||||||
echo cache_dir = $CI_PROJECT_DIR/build/ccache | tee --append ~/.ccache/ccache.conf
|
ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache
|
||||||
- |
|
- |
|
||||||
# compiler_check
|
# compiler_check
|
||||||
echo compiler_check = content | tee --append ~/.ccache/ccache.conf
|
ccache --set-config compiler_check=content
|
||||||
- |
|
- |
|
||||||
# stats_log
|
# stats_log
|
||||||
echo stats_log = $CI_PROJECT_DIR/build/ccache_statslog | tee --append ~/.ccache/ccache.conf
|
ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog || true
|
||||||
- |
|
- |
|
||||||
# max_size
|
# max_size
|
||||||
echo max_size = 300M | tee --append ~/.ccache/ccache.conf
|
ccache --set-config max_size=300M
|
||||||
- |
|
- |
|
||||||
# ccache_config
|
# ccache_config
|
||||||
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,19 @@ SET(CPACK_OUTPUT_FILE_PREFIX package)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||||
|
if(DEFINED VCPKG_TARGET_TRIPLET)
|
||||||
|
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||||
|
else()
|
||||||
|
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT OFF)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(SRB2_CONFIG_SYSTEM_LIBRARIES_DEFAULT ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Clang tidy options will be ignored if CMAKE_<LANG>_CLANG_TIDY are set.
|
||||||
|
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_C "Enable default clang-tidy check configuration for C" OFF)
|
||||||
|
option(SRB2_CONFIG_ENABLE_CLANG_TIDY_CXX "Enable default clang-tidy check configuration for C++" OFF)
|
||||||
option(
|
option(
|
||||||
SRB2_CONFIG_STATIC_STDLIB
|
SRB2_CONFIG_STATIC_STDLIB
|
||||||
"Link static version of standard library. All dependencies must also be static"
|
"Link static version of standard library. All dependencies must also be static"
|
||||||
|
|
@ -70,8 +82,10 @@ option(SRB2_CONFIG_ALWAYS_MAKE_DEBUGLINK "Always make a debuglink .debug." OFF)
|
||||||
option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF)
|
option(SRB2_CONFIG_TESTERS "Compile a build for testers." OFF)
|
||||||
option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
|
option(SRB2_CONFIG_MOBJCONSISTANCY "Compile with MOBJCONSISTANCY defined." OFF)
|
||||||
option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)
|
option(SRB2_CONFIG_PACKETDROP "Compile with PACKETDROP defined." OFF)
|
||||||
|
option(SRB2_CONFIG_EXECINFO "Enable stack trace dump support." ON)
|
||||||
option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
|
option(SRB2_CONFIG_ZDEBUG "Compile with ZDEBUG defined." OFF)
|
||||||
option(SRB2_CONFIG_SKIP_COMPTIME "Skip regenerating comptime. To speed up iterative debug builds in IDEs." OFF)
|
option(SRB2_CONFIG_SKIP_COMPTIME "Skip regenerating comptime. To speed up iterative debug builds in IDEs." OFF)
|
||||||
|
option(SRB2_CONFIG_FORCE_NO_MS_BITFIELDS "Compile without -mno-ms-bitfields compiler flag" OFF)
|
||||||
# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.
|
# SRB2_CONFIG_PROFILEMODE is probably superceded by some CMake setting.
|
||||||
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
|
option(SRB2_CONFIG_PROFILEMODE "Compile for profiling (GCC only)." OFF)
|
||||||
option(SRB2_CONFIG_TRACY "Compile with Tracy profiling enabled" OFF)
|
option(SRB2_CONFIG_TRACY "Compile with Tracy profiling enabled" OFF)
|
||||||
|
|
@ -94,8 +108,18 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
add_subdirectory(thirdparty)
|
add_subdirectory(thirdparty)
|
||||||
|
|
||||||
|
if(SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES)
|
||||||
|
set(SRB2_INTERNAL_LIBRARY_TYPE SHARED)
|
||||||
|
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES OFF)
|
||||||
|
else()
|
||||||
|
set(SRB2_INTERNAL_LIBRARY_TYPE STATIC)
|
||||||
|
set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
find_package(SDL2 CONFIG REQUIRED)
|
find_package(SDL2 CONFIG REQUIRED)
|
||||||
|
|
|
||||||
|
|
@ -101,88 +101,113 @@
|
||||||
"name": "ninja-debug",
|
"name": "ninja-debug",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__debug", "__ninja"]
|
"inherits": [ "__debug", "__ninja" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-develop",
|
"name": "ninja-develop",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__develop", "__ninja"]
|
"inherits": [ "__develop", "__ninja" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-release",
|
"name": "ninja-release",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__release", "__ninja"]
|
"inherits": [ "__release", "__ninja" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-testers",
|
"name": "ninja-testers",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__testers", "__ninja"]
|
"inherits": [ "__testers", "__ninja" ]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "ninja-vcpkg-debug",
|
||||||
|
"hidden": false,
|
||||||
|
"binaryDir": "build/${presetName}",
|
||||||
|
"inherits": [ "__debug", "__ninja", "__vcpkg-toolchain" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ninja-vcpkg-develop",
|
||||||
|
"hidden": false,
|
||||||
|
"binaryDir": "build/${presetName}",
|
||||||
|
"inherits": [ "__develop", "__ninja", "__vcpkg-toolchain" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ninja-vcpkg-release",
|
||||||
|
"hidden": false,
|
||||||
|
"binaryDir": "build/${presetName}",
|
||||||
|
"inherits": [ "__release", "__ninja", "__vcpkg-toolchain" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ninja-vcpkg-testers",
|
||||||
|
"hidden": false,
|
||||||
|
"binaryDir": "build/${presetName}",
|
||||||
|
"inherits": [ "__testers", "__ninja", "__vcpkg-toolchain" ]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
"name": "ninja-x86_mingw_static_vcpkg-debug",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__debug", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
"inherits": [ "__debug", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
"name": "ninja-x86_mingw_static_vcpkg-develop",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__develop", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
"inherits": [ "__develop", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-x86_mingw_static_vcpkg-release",
|
"name": "ninja-x86_mingw_static_vcpkg-release",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__release", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
"inherits": [ "__release", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
"name": "ninja-x86_mingw_static_vcpkg-testers",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__testers", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static"]
|
"inherits": [ "__testers", "__compiler-mingw-w64-i686", "__ninja", "__vcpkg-toolchain", "__mingw-static" ]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "ninja-x64_osx_vcpkg-debug",
|
"name": "ninja-x64_osx_vcpkg-debug",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
"inherits": [ "__debug", "__ninja", "__vcpkg-toolchain", "__osx_x64" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-x64_osx_vcpkg-develop",
|
"name": "ninja-x64_osx_vcpkg-develop",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
"inherits": [ "__develop", "__ninja", "__vcpkg-toolchain", "__osx_x64" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-x64_osx_vcpkg-release",
|
"name": "ninja-x64_osx_vcpkg-release",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_x64"]
|
"inherits": [ "__release", "__ninja", "__vcpkg-toolchain", "__osx_x64" ]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "ninja-arm64_osx_vcpkg-debug",
|
"name": "ninja-arm64_osx_vcpkg-debug",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__debug", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
"inherits": [ "__debug", "__ninja", "__vcpkg-toolchain", "__osx_arm64" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-arm64_osx_vcpkg-develop",
|
"name": "ninja-arm64_osx_vcpkg-develop",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__develop", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
"inherits": [ "__develop", "__ninja", "__vcpkg-toolchain", "__osx_arm64" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ninja-arm64_osx_vcpkg-release",
|
"name": "ninja-arm64_osx_vcpkg-release",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"binaryDir": "build/${presetName}",
|
"binaryDir": "build/${presetName}",
|
||||||
"inherits": ["__release", "__ninja", "__vcpkg-toolchain", "__osx_arm64"]
|
"inherits": [ "__release", "__ninja", "__vcpkg-toolchain", "__osx_arm64" ]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,10 @@ if(("${CMAKE_COMPILER_IS_GNUCC}" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND
|
||||||
target_link_options(SRB2SDL2 PRIVATE "-Wl,--disable-dynamicbase")
|
target_link_options(SRB2SDL2 PRIVATE "-Wl,--disable-dynamicbase")
|
||||||
if("${SRB2_CONFIG_STATIC_STDLIB}")
|
if("${SRB2_CONFIG_STATIC_STDLIB}")
|
||||||
# On MinGW with internal libraries, link the standard library statically
|
# On MinGW with internal libraries, link the standard library statically
|
||||||
target_link_options(SRB2SDL2 PRIVATE "-static")
|
target_link_options(SRB2SDL2 PRIVATE -Wl,--add-stdcall-alias -static-libgcc -static-libstdc++ -static -lpthread)
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE Threads::Threads)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
target_link_options(SRB2SDL2 PRIVATE "-Wl,--large-address-aware")
|
target_link_options(SRB2SDL2 PRIVATE "-Wl,--large-address-aware")
|
||||||
|
|
@ -240,6 +243,10 @@ if (UNIX)
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE -DUNIXCOMMON)
|
target_compile_definitions(SRB2SDL2 PRIVATE -DUNIXCOMMON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (BSD MATCHES "FreeBSD")
|
||||||
|
target_compile_definitions(SRB2SDL2 PRIVATE -DFREEBSD)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
find_program(OBJCOPY objcopy)
|
find_program(OBJCOPY objcopy)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -251,6 +258,11 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if("${CMAKE_SYSTEM_NAME}" MATCHES "Haiku")
|
||||||
|
target_compile_definitions(SRB2SDL2 PRIVATE -DNOEXECINFO)
|
||||||
|
target_link_libraries(SRB2SDL2 PRIVATE network)
|
||||||
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX)
|
target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -410,10 +422,12 @@ endif()
|
||||||
|
|
||||||
# Compatibility flag with later versions of GCC
|
# Compatibility flag with later versions of GCC
|
||||||
# We should really fix our code to not need this
|
# We should really fix our code to not need this
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if (NOT SRB2_CONFIG_FORCE_NO_MS_BITFIELDS)
|
||||||
check_cxx_compiler_flag("-mno-ms-bitfields" HAS_NO_MS_BITFIELDS)
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
if(HAS_NO_MS_BITFIELDS)
|
check_cxx_compiler_flag("-mno-ms-bitfields" HAS_NO_MS_BITFIELDS)
|
||||||
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
if(HAS_NO_MS_BITFIELDS)
|
||||||
|
target_compile_options(SRB2SDL2 PRIVATE -mno-ms-bitfields)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -583,6 +597,11 @@ endif()
|
||||||
if(SRB2_CONFIG_PACKETDROP)
|
if(SRB2_CONFIG_PACKETDROP)
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE -DPACKETDROP)
|
target_compile_definitions(SRB2SDL2 PRIVATE -DPACKETDROP)
|
||||||
endif()
|
endif()
|
||||||
|
if(SRB2_CONFIG_EXECINFO)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(SRB2SDL2 PRIVATE -DNOEXECINFO)
|
||||||
|
message(STATUS "You have disabled stack trace dump support")
|
||||||
|
endif()
|
||||||
if(SRB2_CONFIG_ZDEBUG)
|
if(SRB2_CONFIG_ZDEBUG)
|
||||||
target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG)
|
target_compile_definitions(SRB2SDL2 PRIVATE -DZDEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -626,25 +645,167 @@ if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND NOT
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# copy DLLs to bin/ directory if building internal shared on windows
|
# copy DLLs to bin/ directory if building internal shared on windows
|
||||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND NOT "${SRB2_CONFIG_INTERNAL_LIBRARIES}" AND "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND NOT "${SRB2_CONFIG_INTERNAL_LIBRARIES}")
|
||||||
|
# also copy implicitly linked system libraries
|
||||||
set(ADDITIONAL_DLLS "")
|
set(ADDITIONAL_DLLS "")
|
||||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL GNU)
|
||||||
# also copy implicitly linked system libraries
|
string(CONCAT gcc_search_dirs_path "${CMAKE_BINARY_DIR}" /gcc_search_dirs.txt)
|
||||||
get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
|
#message(STATUS gcc_search_dirs_path=${gcc_search_dirs_path})
|
||||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL GNU)
|
execute_process(
|
||||||
list(APPEND ADDITIONAL_DLLS
|
COMMAND ${CMAKE_CXX_COMPILER} -print-search-dirs
|
||||||
"libgcc_s_dw2-1.dll"
|
OUTPUT_FILE "${gcc_search_dirs_path}"
|
||||||
"libstdc++-6.dll"
|
#OUTPUT_VARIABLE gcc_search_dirs
|
||||||
"libwinpthread-1.dll"
|
)
|
||||||
)
|
|
||||||
else()
|
file(READ "${gcc_search_dirs_path}" gcc_search_dirs)
|
||||||
list(APPEND ADDITIONAL_DLLS
|
#message(STATUS gcc_search_dirs=${gcc_search_dirs})
|
||||||
"libunwind.dll"
|
|
||||||
"libc++.dll"
|
#set(gcc_install_dir "${gcc_search_dirs}")
|
||||||
"libwinpthread-1.dll"
|
#string(REGEX MATCH "install: =[ \t]*([^\r\n]*)" gcc_install_dir "${gcc_install_dir}" )
|
||||||
)
|
#set(gcc_install_dir "${CMAKE_MATCH_1}")
|
||||||
|
#message(STATUS gcc_install_dir="${gcc_install_dir}")
|
||||||
|
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_install_path_1 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_install_1.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_install_path_1=${gcc_search_dirs_install_path_1})
|
||||||
|
execute_process(
|
||||||
|
COMMAND grep "^install:"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_path}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_install_path_1}"
|
||||||
|
)
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_install_path_2 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_install_2.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_install_path_2=${gcc_search_dirs_install_path_2})
|
||||||
|
execute_process(
|
||||||
|
COMMAND sed -e "s/^install: //" -e "s,=/,/,g"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_install_path_1}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_install_path_2}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows"))
|
||||||
|
string(REPLACE ":" ";" gcc_install_dir "${gcc_install_dir}")
|
||||||
endif()
|
endif()
|
||||||
list(TRANSFORM ADDITIONAL_DLLS PREPEND "${MINGW_BIN_PATH}/")
|
|
||||||
|
file(READ ${gcc_search_dirs_install_path_2} gcc_install_dir)
|
||||||
|
|
||||||
|
#set(gcc_programs_dir "${gcc_search_dirs}")
|
||||||
|
#string(REGEX MATCH "programs: =[ \t]*([^\r\n]*)" gcc_programs_dir "${gcc_programs_dir}" )
|
||||||
|
#set(gcc_programs_dir "${CMAKE_MATCH_1}")
|
||||||
|
#message(STATUS gcc_programs_dir="${gcc_programs_dir}")
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_programs_path_1 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_programs_1.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_programs_path_1=${gcc_search_dirs_programs_path_1})
|
||||||
|
execute_process(
|
||||||
|
COMMAND grep "^programs:"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_path}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_programs_path_1}"
|
||||||
|
)
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_programs_path_2 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_programs_2.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_programs_path_2=${gcc_search_dirs_programs_path_2})
|
||||||
|
execute_process(
|
||||||
|
COMMAND sed -e "s/^programs: =//" -e "s,=/,/,g"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_programs_path_1}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_programs_path_2}"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(READ ${gcc_search_dirs_programs_path_2} gcc_programs_dir)
|
||||||
|
|
||||||
|
if(NOT ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows"))
|
||||||
|
string(REPLACE ":" ";" gcc_programs_dir "${gcc_programs_dir}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#set(gcc_libraries_dir "${gcc_search_dirs}")
|
||||||
|
#string(REGEX MATCH "libraries: =[ \t]*([^\r\n]*)" gcc_libraries_dir "${gcc_libraries_dir}" )
|
||||||
|
#set(gcc_libraries_dir "${CMAKE_MATCH_1}")
|
||||||
|
#message(STATUS gcc_libraries_dir="${gcc_libraries_dir}")
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_libraries_path_1 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_libraries_1.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_libraries_path_1=${gcc_search_dirs_libraries_path_1})
|
||||||
|
execute_process(
|
||||||
|
COMMAND grep "^libraries:"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_path}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_libraries_path_1}"
|
||||||
|
)
|
||||||
|
|
||||||
|
string(CONCAT gcc_search_dirs_libraries_path_2 "${CMAKE_BINARY_DIR}" /gcc_search_dirs_libraries_2.txt)
|
||||||
|
#message(STATUS gcc_search_dirs_libraries_path_2=${gcc_search_dirs_libraries_path_2})
|
||||||
|
execute_process(
|
||||||
|
COMMAND sed -e "s/^libraries: =//" -e "s,=/,/,g"
|
||||||
|
INPUT_FILE "${gcc_search_dirs_libraries_path_1}"
|
||||||
|
OUTPUT_FILE "${gcc_search_dirs_libraries_path_2}"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(READ ${gcc_search_dirs_libraries_path_2} gcc_libraries_dir)
|
||||||
|
|
||||||
|
if(NOT ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows"))
|
||||||
|
string(REPLACE ":" ";" gcc_libraries_dir "${gcc_libraries_dir}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#list(LENGTH gcc_install_dir gcc_install_dir_len)
|
||||||
|
#list(LENGTH gcc_programs_dir gcc_programs_dir_len)
|
||||||
|
#list(LENGTH gcc_libraries_dir gcc_libraries_dir_len)
|
||||||
|
#message(STATUS gcc_install_dir_len="${gcc_install_dir_len}")
|
||||||
|
#message(STATUS gcc_install_dir="${gcc_install_dir}")
|
||||||
|
#message(STATUS gcc_programs_dir_len="${gcc_programs_dir_len}")
|
||||||
|
#message(STATUS gcc_programs_dir="${gcc_programs_dir}")
|
||||||
|
#message(STATUS gcc_libraries_dir_len="${gcc_libraries_dir_len}")
|
||||||
|
#message(STATUS gcc_libraries_dir="${gcc_libraries_dir}")
|
||||||
|
|
||||||
|
get_filename_component(CMAKE_CXX_COMPILER_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||||
|
#message(STATUS CMAKE_CXX_COMPILER_DIR="${CMAKE_CXX_COMPILER_DIR}")
|
||||||
|
|
||||||
|
set(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES "" ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
|
set(OLD_CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
|
||||||
|
set(CMAKE_FIND_LIBRARY_PREFIXES "" ${CMAKE_FIND_LIBRARY_PREFIXES})
|
||||||
|
|
||||||
|
find_library(LIBUNWIND
|
||||||
|
NAMES "libunwind.dll"
|
||||||
|
PATHS ${gcc_programs_dir} ${CMAKE_CXX_COMPILER_DIR}
|
||||||
|
)
|
||||||
|
if (LIBUNWIND)
|
||||||
|
#message(STATUS LIBUNWIND="${LIBUNWIND}")
|
||||||
|
list(APPEND ADDITIONAL_DLLS ${LIBUNWIND})
|
||||||
|
endif()
|
||||||
|
unset(LIBUNWIND)
|
||||||
|
find_library(LIBGCC
|
||||||
|
NAMES "libgcc_s_dw2-1.dll" "libgcc_s_sjlj-1.dll" "libgcc_s_seh-1.dll"
|
||||||
|
PATHS ${gcc_programs_dir} ${CMAKE_CXX_COMPILER_DIR}
|
||||||
|
)
|
||||||
|
if (LIBGCC)
|
||||||
|
#message(STATUS LIBGCC="${LIBGCC}")
|
||||||
|
list(APPEND ADDITIONAL_DLLS ${LIBGCC})
|
||||||
|
endif()
|
||||||
|
unset(LIBGCC)
|
||||||
|
find_library(LIBSTDCPP
|
||||||
|
NAMES "libstdc++-6.dll" "libc++.dll"
|
||||||
|
PATHS ${gcc_programs_dir} ${CMAKE_CXX_COMPILER_DIR}
|
||||||
|
)
|
||||||
|
if (LIBSTDCPP)
|
||||||
|
#message(STATUS LIBSTDCPP="${LIBSTDCPP}")
|
||||||
|
list(APPEND ADDITIONAL_DLLS ${LIBSTDCPP})
|
||||||
|
endif()
|
||||||
|
unset(LIBSTDCPP)
|
||||||
|
find_library(LIBPTHREAD
|
||||||
|
NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll"
|
||||||
|
PATHS ${gcc_libraries_dir} ${CMAKE_CXX_COMPILER_DIR}
|
||||||
|
)
|
||||||
|
if(LIBPTHREAD)
|
||||||
|
#message(STATUS LIBPTHREAD="${LIBPTHREAD}")
|
||||||
|
list(APPEND ADDITIONAL_DLLS ${LIBPTHREAD})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
|
set(CMAKE_FIND_LIBRARY_PREFIXES ${OLD_CMAKE_FIND_LIBRARY_PREFIXES})
|
||||||
|
unset(LIBPTHREAD)
|
||||||
|
unset(gcc_install_dir)
|
||||||
|
unset(gcc_programs_dir)
|
||||||
|
unset(gcc_libraries_dir)
|
||||||
|
unset(OLD_CMAKE_FIND_LIBRARY_SUFFIXES)
|
||||||
|
unset(OLD_CMAKE_FIND_LIBRARY_PREFIXES)
|
||||||
|
|
||||||
|
#message(STATUS ADDITIONAL_DLLS="${ADDITIONAL_DLLS}")
|
||||||
endif()
|
endif()
|
||||||
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
add_custom_command(TARGET SRB2SDL2 POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
|
@ -656,3 +817,11 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND NOT "${SRB2_CONFIG_INTERNAL_LIBRA
|
||||||
COMMENT "Copying runtime DLLs"
|
COMMENT "Copying runtime DLLs"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Setup clang-tidy
|
||||||
|
if(SRB2_CONFIG_ENABLE_CLANG_TIDY_C)
|
||||||
|
target_set_default_clang_tidy(SRB2SDL2 C "-*,clang-analyzer-*,-clang-analyzer-cplusplus-*")
|
||||||
|
endif()
|
||||||
|
if(SRB2_CONFIG_ENABLE_CLANG_TIDY_CXX)
|
||||||
|
target_set_default_clang_tidy(SRB2SDL2 CXX "-*,clang-analyzer-*,modernize-*")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json"
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
vcpkg.json
30
vcpkg.json
|
|
@ -1,17 +1,17 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||||
"name": "ringracers",
|
"name": "ringracers",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": [
|
"builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf",
|
||||||
"curl",
|
"dependencies": [
|
||||||
"sdl2",
|
"curl",
|
||||||
"libpng",
|
"libogg",
|
||||||
"libogg",
|
"libpng",
|
||||||
"libvpx",
|
"libvorbis",
|
||||||
"libvorbis",
|
"libvpx",
|
||||||
"libyuv",
|
"libyuv",
|
||||||
"opus",
|
"opus",
|
||||||
"zlib"
|
"sdl2",
|
||||||
],
|
"zlib"
|
||||||
"builtin-baseline": "c591ac6466a55ef0a05a3d56bb1489ca36e50102"
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue