[DO-973] harfbuzz package (!10)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/10
This commit is contained in:
Aleksandr Vodyanov
2024-12-26 12:02:17 +03:00
parent 39afe6a1dd
commit c807f2514e
126 changed files with 6604 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C)
find_package(glib CONFIG REQUIRED)
add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0)

View File

@@ -0,0 +1,10 @@
{
"version": 4,
"vendor": {
"conan": {}
},
"include": [
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
]
}

View File

@@ -0,0 +1,28 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv"
test_type = "explicit"
def layout(self):
cmake_layout(self)
def requirements(self):
self.requires(self.tested_reference_str, run=True)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")
if self.settings.os != "Windows":
self.run("gdbus-codegen -h", env="conanrun")

View File

@@ -0,0 +1,26 @@
#include <stdlib.h>
#include <stdio.h>
#include "glib.h"
#include "gmodule.h"
#include "gio/gio.h"
int main() {
printf("glib %d.%d.%d\n", glib_major_version, glib_minor_version, glib_micro_version);
printf("glib interface age: %d\n", glib_interface_age);
printf("glib binary age: %d\n", glib_binary_age);
GQueue *queue = g_queue_new();
g_queue_free(queue);
printf("glib module supported: %s\n", g_module_supported() ? "true" : "false");
GMutex m;
g_mutex_init(&m);
g_mutex_clear(&m);
printf("type name for char: %s\n", g_type_name(G_TYPE_CHAR));
return EXIT_SUCCESS;
}