Add packages and update others

This commit is contained in:
2026-02-11 14:04:58 +01:00
parent 6c90c821bf
commit edff40e77a
17 changed files with 685 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C CXX)
find_package(assimp REQUIRED CONFIG)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE assimp::assimp)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
add_executable(${PROJECT_NAME}_c test_package.c)
target_link_libraries(${PROJECT_NAME}_c PRIVATE assimp::assimp)

View File

@@ -0,0 +1,29 @@
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", "arch", "compiler", "build_type"
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
test_type = "explicit"
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")
bin_c_path = os.path.join(self.cpp.build.bindirs[0], "test_package_c")
self.run(bin_c_path, env="conanrun")

View File

@@ -0,0 +1,17 @@
#include <stdio.h>
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
int main(int argc, char **argv) {
const C_STRUCT aiScene *scene = aiImportFile("",
aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
aiProcess_SortByPType);
aiReleaseImport(scene);
return 0;
}

View File

@@ -0,0 +1,16 @@
#include <iostream>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
int main(int argc, char **argv) {
Assimp::Importer importer;
const aiScene* scene = importer.ReadFile("",
aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
aiProcess_SortByPType);
return 0;
}