mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-28 06:32:11 +00:00
cmake
This commit is contained in:
parent
1af6cae7b4
commit
4dbb6d8da8
5 changed files with 9 additions and 14 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./build.py --target quasi-glib
|
# ./build.py --target quasi-glib
|
||||||
./build.py --target ${{ matrix.target }} ${{ matrix.flavor.args }}
|
./build.py --target ${{ matrix.target }} ${{ matrix.flavor.args }}
|
||||||
|
|
||||||
- name: List Build Directory
|
- name: List Build Directory
|
||||||
|
|
|
@ -507,22 +507,12 @@ class PcreTarget(ConfigureMakeStaticDependencyTarget):
|
||||||
self.update_config_script(state.install_path / 'bin/pcre-config')
|
self.update_config_script(state.install_path / 'bin/pcre-config')
|
||||||
|
|
||||||
|
|
||||||
class QuasiGlibTarget(BuildTarget):
|
class QuasiGlibTarget(CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='quasi-glib'):
|
def __init__(self, name='quasi-glib'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
|
||||||
def build(self, state: BuildState):
|
def prepare_source(self, state: BuildState):
|
||||||
lib_path = state.install_path / 'lib'
|
state.source = state.patch_path / self.name
|
||||||
os.makedirs(lib_path, exist_ok=True)
|
|
||||||
|
|
||||||
commands = (
|
|
||||||
[state.cxx_compiler(), '-std=c++11', '-O3', '-c', state.patch_path / f'{self.name}.cpp'] +
|
|
||||||
shlex.split(state.environment['CXXFLAGS']),
|
|
||||||
(state.host() + '-ar', '-crs', lib_path / f'lib{self.name}.a', f'{self.name}.o'),
|
|
||||||
)
|
|
||||||
|
|
||||||
for command in commands:
|
|
||||||
subprocess.run(command, check=True, cwd=state.build_path, env=state.environment)
|
|
||||||
|
|
||||||
|
|
||||||
class SndFileTarget(CMakeStaticDependencyTarget):
|
class SndFileTarget(CMakeStaticDependencyTarget):
|
||||||
|
|
BIN
deps/quasi-glib/lib/libquasi-glib.a
vendored
BIN
deps/quasi-glib/lib/libquasi-glib.a
vendored
Binary file not shown.
5
patch/quasi-glib/CMakeLists.txt
Normal file
5
patch/quasi-glib/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
project(quasi-glib)
|
||||||
|
add_library(quasi-glib quasi-glib.cpp)
|
||||||
|
set_property(TARGET quasi-glib PROPERTY CXX_STANDARD 11)
|
||||||
|
install(TARGETS quasi-glib)
|
Loading…
Reference in a new issue