Update cmake and meson templates

This commit is contained in:
2025-09-10 18:16:25 +03:00
parent d5abad3371
commit 0fdef74c73
2 changed files with 8 additions and 22 deletions
+4 -11
View File
@@ -15,27 +15,20 @@ prepare() {
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
cd build
make test
ctest --test-dir build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
cd build
make DESTDIR="$BPM_OUTPUT" install
DESTDIR="$BPM_OUTPUT" cmake --install build
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/$NAME/LICENSE