[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,8 @@
cmake_minimum_required(VERSION 3.8)
project(test_package LANGUAGES C)
find_package(harfbuzz REQUIRED CONFIG)
add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE harfbuzz::harfbuzz)
target_compile_features(${PROJECT_NAME} PRIVATE c_std_99)

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,27 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake, cmake_layout
import os
class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
test_type = "explicit"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
def layout(self):
cmake_layout(self)
def requirements(self):
self.requires(self.tested_reference_str)
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")

View File

@@ -0,0 +1,9 @@
#include <stdio.h>
#include <string.h>
#include <hb.h>
int main() {
const char *version = hb_version_string();
printf("harfbuzz version: %s\n", version);
return 0;
}