From 4dbb6d8da885483e5e7be260c590b4cb0acca836 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 31 Dec 2022 10:15:48 +0200 Subject: [PATCH] cmake --- .github/workflows/build.yml | 2 +- aedi/target/library_tier1.py | 16 +++------------- deps/quasi-glib/lib/libquasi-glib.a | Bin 17840 -> 17832 bytes patch/quasi-glib/CMakeLists.txt | 5 +++++ patch/{ => quasi-glib}/quasi-glib.cpp | 0 5 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 patch/quasi-glib/CMakeLists.txt rename patch/{ => quasi-glib}/quasi-glib.cpp (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7188987..c457f2bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - name: Build run: | - ./build.py --target quasi-glib +# ./build.py --target quasi-glib ./build.py --target ${{ matrix.target }} ${{ matrix.flavor.args }} - name: List Build Directory diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index dfb11168..d275fe8e 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -507,22 +507,12 @@ class PcreTarget(ConfigureMakeStaticDependencyTarget): self.update_config_script(state.install_path / 'bin/pcre-config') -class QuasiGlibTarget(BuildTarget): +class QuasiGlibTarget(CMakeStaticDependencyTarget): def __init__(self, name='quasi-glib'): super().__init__(name) - def build(self, state: BuildState): - lib_path = state.install_path / 'lib' - 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) + def prepare_source(self, state: BuildState): + state.source = state.patch_path / self.name class SndFileTarget(CMakeStaticDependencyTarget): diff --git a/deps/quasi-glib/lib/libquasi-glib.a b/deps/quasi-glib/lib/libquasi-glib.a index ced36fda0f950dca2a2da422b9ef07394ce6925d..9063454a1e60f5021be4ac7d89a10add313412c1 100644 GIT binary patch delta 230 zcmdnc&A6hQae}zu0|o{LW<~}E9v}?_DgqNVRMlD5 z$?VUmz{J470<_}A%d3vH&xU6%6d< zj0}K;f}w$dnTd&lf`ti)1c3yu!qUXzOx^UH%p|>hkU^7mm?aoFCc82lGipq(WcKIO zU}9ik0ZM$Be35xNX93VYW*|>vav_U5z{YXz)n`g&BE4`Wb-A86<%C2avD@ m(kC|mWHFXUavB@NX_IfM>9T^Y+{~k%#mEXaVRN;Ht}Fl~t1S5d diff --git a/patch/quasi-glib/CMakeLists.txt b/patch/quasi-glib/CMakeLists.txt new file mode 100644 index 00000000..dc3ec4dc --- /dev/null +++ b/patch/quasi-glib/CMakeLists.txt @@ -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) diff --git a/patch/quasi-glib.cpp b/patch/quasi-glib/quasi-glib.cpp similarity index 100% rename from patch/quasi-glib.cpp rename to patch/quasi-glib/quasi-glib.cpp