mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-19 16:01:35 +00:00
Merge branch 'macosx-next' into 'next'
compiling SRB2 with OSXCROSS for Mac Port See merge request STJr/SRB2!2374
This commit is contained in:
commit
f7ee9e64c9
4 changed files with 97 additions and 10 deletions
|
@ -533,7 +533,7 @@ Debian stable Clang:
|
|||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/comptime.h"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
|
@ -564,7 +564,7 @@ Debian stable Clang:
|
|||
- - |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.clang -D CPM_USE_LOCAL_PACKAGES:BOOL=ON -D SRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -D SRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -G "Unix Makefiles"
|
||||
- cmake -B build.clang -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# cmake
|
||||
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
|
||||
|
@ -572,7 +572,7 @@ Debian stable Clang:
|
|||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.clang --keep-going || make --directory=src --keep-going
|
||||
- make --directory=build.clang --keep-going || make --directory=build.clang --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
@ -589,7 +589,7 @@ Debian testing Clang:
|
|||
artifacts:
|
||||
paths:
|
||||
- "build.clang/bin/"
|
||||
- "build.clang/src/comptime.h"
|
||||
- "build.clang/src/config.h"
|
||||
expose_as: "testing-clang"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-testing-clang"
|
||||
|
||||
|
@ -764,3 +764,85 @@ Alpine 3 GCC Dedicated:
|
|||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
osxcross x86_64:
|
||||
stage: build
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac x86_64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
OSXCROSS_HOST: x86_64-apple-darwin21.4
|
||||
LD: x86_64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --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_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
osxcross arm64:
|
||||
stage: build
|
||||
|
||||
when: manual
|
||||
|
||||
allow_failure: true
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- "build.osxcross/bin/"
|
||||
- "build.osxcross/src/config.h"
|
||||
expose_as: "Mac arm64"
|
||||
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-clang"
|
||||
|
||||
variables:
|
||||
OSXCROSS_HOST: arm64-apple-darwin21.4
|
||||
LD: arm64-apple-darwin21.4-ld
|
||||
|
||||
script:
|
||||
- - |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages"
|
||||
- osxcross-macports install --arm64 curl libopenmpt libsdl2_mixer
|
||||
- |
|
||||
# apt_development
|
||||
echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KBuilding Makefiles"
|
||||
- cmake -B build.osxcross --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_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles"
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
||||
- - |
|
||||
# make
|
||||
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
|
||||
- make --directory=build.osxcross --keep-going || make --directory=build.osxcross --keep-going
|
||||
- |
|
||||
# make
|
||||
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
|
||||
|
|
|
@ -70,6 +70,7 @@ cmake_dependent_option(
|
|||
OFF
|
||||
)
|
||||
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
|
||||
option(SRB2_CONFIG_USE_GME "Enable GME playback support" OFF)
|
||||
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
|
||||
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
|
||||
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
|
||||
|
|
|
@ -173,11 +173,13 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
|||
target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX)
|
||||
endif()
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE gme)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_GME)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
# this sucks but gme doesn't use modern cmake to delineate public headers
|
||||
target_include_directories(SRB2SDL2 PRIVATE "${libgme_SOURCE_DIR}")
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
target_link_libraries(SRB2SDL2 PRIVATE gme)
|
||||
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_GME)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
# this sucks but gme doesn't use modern cmake to delineate public headers
|
||||
target_include_directories(SRB2SDL2 PRIVATE "${libgme_SOURCE_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(SRB2SDL2 PRIVATE openmpt)
|
||||
|
|
4
thirdparty/CMakeLists.txt
vendored
4
thirdparty/CMakeLists.txt
vendored
|
@ -18,4 +18,6 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
include("cpm-openmpt.cmake")
|
||||
endif()
|
||||
|
||||
include("cpm-libgme.cmake")
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
include("cpm-libgme.cmake")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue