Add packages and update others
This commit is contained in:
11
assimp/5.x/test_package/CMakeLists.txt
Normal file
11
assimp/5.x/test_package/CMakeLists.txt
Normal 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)
|
||||
29
assimp/5.x/test_package/conanfile.py
Normal file
29
assimp/5.x/test_package/conanfile.py
Normal 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")
|
||||
17
assimp/5.x/test_package/test_package.c
Normal file
17
assimp/5.x/test_package/test_package.c
Normal 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;
|
||||
}
|
||||
16
assimp/5.x/test_package/test_package.cpp
Normal file
16
assimp/5.x/test_package/test_package.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user