mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 08:50:53 +00:00
ci: Add Gitlab CI config for cmake build
This commit is contained in:
parent
b9c677e537
commit
2b1d03aa16
2 changed files with 25 additions and 3 deletions
21
.gitlab-ci.yml
Normal file
21
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
build:
|
||||
image:
|
||||
name: purplekarrot/mingw-w64-i686:latest
|
||||
entrypoint: [""]
|
||||
artifacts:
|
||||
paths:
|
||||
- build/bin/*.exe
|
||||
- build/bin/*.exe.debug
|
||||
expire_in: 1 day
|
||||
script:
|
||||
- apt-get -qq update && apt-get -qq install -y --no-install-recommends git
|
||||
- mkdir -p .cpm
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- >
|
||||
cmake -G "Ninja"
|
||||
"-DCPM_SOURCE_CACHE=$CI_PROJECT_DIR/.cpm"
|
||||
-DCMAKE_TOOLCHAIN_FILE=/toolchain.cmake
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
..
|
||||
- ninja -j 1
|
7
thirdparty/CMakeLists.txt
vendored
7
thirdparty/CMakeLists.txt
vendored
|
@ -91,6 +91,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zlib.pc.cmakein" "${ZLIB_BINARY_DIR}/zlib.pc" @ONLY)
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zconf.h.cmakein" "${ZLIB_BINARY_DIR}/include/zconf.h" @ONLY)
|
||||
configure_file("${ZLIB_SOURCE_DIR}/zlib.h" "${ZLIB_BINARY_DIR}/include/zlib.h" @ONLY)
|
||||
|
||||
add_library(ZLIB ${SRB2_INTERNAL_LIBRARY_TYPE} ${ZLIB_SRCS})
|
||||
set_target_properties(ZLIB PROPERTIES
|
||||
|
@ -173,8 +174,8 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
target_include_directories(png PUBLIC "${png_BINARY_DIR}/include")
|
||||
|
||||
# ... and these also need to be present only for png build
|
||||
target_include_directories(png PRIVATE "${zlib_SOURCE_DIR}")
|
||||
target_include_directories(png PRIVATE "${zlib_BINARY_DIR}")
|
||||
target_include_directories(png PRIVATE "${ZLIB_SOURCE_DIR}")
|
||||
target_include_directories(png PRIVATE "${ZLIB_BINARY_DIR}")
|
||||
target_include_directories(png PRIVATE "${png_BINARY_DIR}")
|
||||
|
||||
target_link_libraries(png PRIVATE ZLIB::ZLIB)
|
||||
|
@ -495,7 +496,7 @@ if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
if("${CMAKE_C_COMPILER_ID}" STREQUAL GNU OR "${CMAKE_C_COMPILER_ID}" STREQUAL Clang OR "${CMAKE_C_COMPILER_ID}" STREQUAL AppleClang)
|
||||
target_compile_options(openmpt PRIVATE "-g0")
|
||||
endif()
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL Windows AND "${CMAKE_C_COMPILER_ID}" STREQUAL MSVC)
|
||||
target_link_libraries(openmpt PRIVATE Rpcrt4)
|
||||
endif()
|
||||
target_compile_features(openmpt PRIVATE cxx_std_11)
|
||||
|
|
Loading…
Reference in a new issue