-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from conan-io/master
merge
- Loading branch information
Showing
223 changed files
with
4,728 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
sources: | ||
"19.00": | ||
url: https://www.7-zip.org/a/7z1900-src.7z | ||
filename: 7zip.7z | ||
|
||
checksum: | ||
"19.00": | ||
file_path: 7zip.7z | ||
signature: 9ba70a5e8485cf9061b30a2a84fe741de5aeb8dd271aab8889da0e9b3bf1868e | ||
|
||
externals: | ||
lzma: | ||
url: https://www.7-zip.org/a/lzma920.tar.bz2 | ||
destination: lzma920 | ||
sha256: 8ac221acdca8b6f6dd110120763af42b3707363752fc04e63c7bbff76774a445 | ||
sha256: "9ba70a5e8485cf9061b30a2a84fe741de5aeb8dd271aab8889da0e9b3bf1868e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.1.0) | ||
|
||
project(cmake_wrapper) | ||
|
||
set(CMAKE_VERBOSE_MAKEFILE TRUE) | ||
|
||
include(${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
|
||
add_subdirectory("source_subfolder") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sources: | ||
"5.0.0": | ||
sha256: 0c81f2d6c2b18272c98727e21846a9a8a203b15e8957c2ff7a6e76a1c52af2d3 | ||
url: https://github.com/assimp/assimp/archive/v5.0.0.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
import os | ||
from conans import ConanFile, CMake, tools | ||
|
||
|
||
class Assimp(ConanFile): | ||
name = "assimp" | ||
version = "5.0.0" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://github.com/assimp/assimp" | ||
description = "A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data." | ||
topics = ("conan", "assimp", "3d") | ||
license = "BSD-3-Clause" | ||
|
||
requires = "zlib/1.2.11", "irrxml/1.2" | ||
|
||
exports_sources = ["CMakeLists.txt"] | ||
|
||
generators = "cmake" | ||
|
||
settings = "os", "compiler", "build_type", "arch" | ||
options = { | ||
"shared": [True, False], | ||
"double_precision": [True, False], | ||
"fPIC": [True, False], | ||
} | ||
default_options = { | ||
"shared": False, | ||
"double_precision": False, | ||
"fPIC": True, | ||
} | ||
|
||
_format_option_map = { | ||
"with_3d": "ASSIMP_BUILD_3D_IMPORTER", | ||
"with_3ds": "ASSIMP_BUILD_3DS_IMPORTER", | ||
"with_3ds_exporter": "ASSIMP_BUILD_3DS_EXPORTER", | ||
"with_3mf": "ASSIMP_BUILD_3MF_IMPORTER", | ||
"with_3mf_exporter": "ASSIMP_BUILD_3MF_EXPORTER", | ||
"with_ac": "ASSIMP_BUILD_AC_IMPORTER", | ||
"with_amf": "ASSIMP_BUILD_AMF_IMPORTER", | ||
"with_ase": "ASSIMP_BUILD_ASE_IMPORTER", | ||
"with_assbin": "ASSIMP_BUILD_ASSBIN_IMPORTER", | ||
"with_assbin_exporter": "ASSIMP_BUILD_ASSBIN_EXPORTER", | ||
"with_assxml_exporter": "ASSIMP_BUILD_ASSXML_EXPORTER", | ||
"with_assjson_exporter": "ASSIMP_BUILD_ASSJSON_EXPORTER", | ||
"with_b3d": "ASSIMP_BUILD_B3D_IMPORTER", | ||
"with_blend": "ASSIMP_BUILD_BLEND_IMPORTER", | ||
"with_bvh": "ASSIMP_BUILD_BVH_IMPORTER", | ||
"with_ms3d": "ASSIMP_BUILD_MS3D_IMPORTER", | ||
"with_cob": "ASSIMP_BUILD_COB_IMPORTER", | ||
"with_collada": "ASSIMP_BUILD_COLLADA_IMPORTER", | ||
"with_collada_exporter": "ASSIMP_BUILD_COLLADA_EXPORTER", | ||
"with_csm": "ASSIMP_BUILD_CSM_IMPORTER", | ||
"with_dxf": "ASSIMP_BUILD_DXF_IMPORTER", | ||
"with_fbx": "ASSIMP_BUILD_FBX_IMPORTER", | ||
"with_fbx_exporter": "ASSIMP_BUILD_FBX_EXPORTER", | ||
"with_gltf": "ASSIMP_BUILD_GLTF_IMPORTER", | ||
"with_gltf_exporter": "ASSIMP_BUILD_GLTF_EXPORTER", | ||
"with_hmp": "ASSIMP_BUILD_HMP_IMPORTER", | ||
"with_ifc": "ASSIMP_BUILD_IFC_IMPORTER", | ||
"with_irr": "ASSIMP_BUILD_IRR_IMPORTER", | ||
"with_irrmesh": "ASSIMP_BUILD_IRRMESH_IMPORTER", | ||
"with_lwo": "ASSIMP_BUILD_LWO_IMPORTER", | ||
"with_lws": "ASSIMP_BUILD_LWS_IMPORTER", | ||
"with_md2": "ASSIMP_BUILD_MD2_IMPORTER", | ||
"with_md3": "ASSIMP_BUILD_MD3_IMPORTER", | ||
"with_md5": "ASSIMP_BUILD_MD5_IMPORTER", | ||
"with_mdc": "ASSIMP_BUILD_MDC_IMPORTER", | ||
"with_mdl": "ASSIMP_BUILD_MDL_IMPORTER", | ||
"with_mmd": "ASSIMP_BUILD_MMD_IMPORTER", | ||
"with_ndo": "ASSIMP_BUILD_NDO_IMPORTER", | ||
"with_nff": "ASSIMP_BUILD_NFF_IMPORTER", | ||
"with_obj": "ASSIMP_BUILD_OBJ_IMPORTER", | ||
"with_obj_exporter": "ASSIMP_BUILD_OBJ_EXPORTER", | ||
"with_off": "ASSIMP_BUILD_OFF_IMPORTER", | ||
"with_ogre": "ASSIMP_BUILD_OGRE_IMPORTER", | ||
"with_opengex": "ASSIMP_BUILD_OPENGEX_IMPORTER", | ||
"with_opengex_exporter": "ASSIMP_BUILD_OPENGEX_EXPORTER", | ||
"with_ply": "ASSIMP_BUILD_PLY_IMPORTER", | ||
"with_ply_exporter": "ASSIMP_BUILD_PLY_EXPORTER", | ||
"with_q3bsp": "ASSIMP_BUILD_Q3BSP_IMPORTER", | ||
"with_q3d": "ASSIMP_BUILD_Q3D_IMPORTER", | ||
"with_raw": "ASSIMP_BUILD_RAW_IMPORTER", | ||
"with_sib": "ASSIMP_BUILD_SIB_IMPORTER", | ||
"with_smd": "ASSIMP_BUILD_SMD_IMPORTER", | ||
"with_step": "ASSIMP_BUILD_STEP_IMPORTER", | ||
"with_step_exporter": "ASSIMP_BUILD_STEP_EXPORTER", | ||
"with_stl": "ASSIMP_BUILD_STL_IMPORTER", | ||
"with_stl_exporter": "ASSIMP_BUILD_STL_EXPORTER", | ||
"with_terragen": "ASSIMP_BUILD_TERRAGEN_IMPORTER", | ||
"with_x": "ASSIMP_BUILD_X_IMPORTER", | ||
"with_x_exporter": "ASSIMP_BUILD_X_EXPORTER", | ||
"with_x3d": "ASSIMP_BUILD_X3D_IMPORTER", | ||
"with_x3d_exporter": "ASSIMP_BUILD_X3D_EXPORTER", | ||
"with_xgl": "ASSIMP_BUILD_XGL_IMPORTER", | ||
} | ||
options.update(dict.fromkeys(_format_option_map, [True, False])) | ||
default_options.update(dict.fromkeys(_format_option_map, True)) | ||
|
||
_source_subfolder = "source_subfolder" | ||
_build_subfolder = "build_subfolder" | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": | ||
del self.options.fPIC | ||
|
||
def source(self): | ||
tools.get(**self.conan_data["sources"][self.version]) | ||
os.rename("assimp-%s" % self.version, self._source_subfolder) | ||
|
||
def _configure_cmake(self): | ||
cmake = CMake(self) | ||
cmake.definitions["SYSTEM_IRRXML"] = True | ||
cmake.definitions["ASSIMP_DOUBLE_PRECISION"] = self.options.double_precision | ||
cmake.definitions["ASSIMP_NO_EXPORT"] = False | ||
cmake.definitions["ASSIMP_BUILD_ASSIMP_TOOLS"] = False | ||
cmake.definitions["ASSIMP_BUILD_TESTS"] = False | ||
cmake.definitions["ASSIMP_BUILD_SAMPLES"] = False | ||
cmake.definitions["ASSIMP_INSTALL_PDB"] = False | ||
|
||
cmake.definitions["ASSIMP_ANDROID_JNIIOSYSTEM"] = False | ||
|
||
cmake.definitions["ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT"] = False | ||
cmake.definitions["ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT"] = False | ||
for option, definition in self._format_option_map.items(): | ||
cmake.definitions[definition] = bool(getattr(self.options, option)) | ||
|
||
cmake.configure(build_folder=self._build_subfolder) | ||
return cmake | ||
|
||
def build(self): | ||
for before, after in [("-fPIC", ""), ("-g ", ""), ('SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi")', "")]: | ||
tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), before, after) | ||
cmake = self._configure_cmake() | ||
cmake.build() | ||
|
||
def package(self): | ||
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) | ||
cmake = self._configure_cmake() | ||
cmake.install() | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = tools.collect_libs(self) | ||
if self.settings.os == "Linux": | ||
self.cpp_info.system_libs = ["rt", "m", "pthread"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 2.8.11) | ||
project(test_package CXX) | ||
|
||
set(CMAKE_VERBOSE_MAKEFILE TRUE) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os | ||
from conans import ConanFile, CMake | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <iostream> | ||
#include "assimp/version.h" | ||
#include "assimp/Importer.hpp" | ||
|
||
int main() { | ||
Assimp::Importer importer; | ||
std::cout << "Assimp version " << aiGetVersionMajor() << "." << aiGetVersionMinor() << "." << aiGetVersionRevision() << std::endl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
versions: | ||
"5.0.0": | ||
folder: "5.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ versions: | |
folder: all | ||
"4.0.1": | ||
folder: all | ||
"4.1.0": | ||
folder: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 2.8.12) | ||
project(cmake_wrapper) | ||
|
||
if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
else() | ||
include(conanbuildinfo.cmake) | ||
endif() | ||
conan_basic_setup() | ||
|
||
add_subdirectory("source_subfolder") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sources: | ||
"1.4": | ||
url: "https://github.com/bombela/backward-cpp/archive/v1.4.tar.gz" | ||
sha256: "ad73be31c5cfcbffbde7d34dba18158a42043a109e7f41946f0b0abd589ed55e" | ||
patches: | ||
"1.4": | ||
- patch_file: "patches/backward-cpp-1.4.patch" | ||
base_path: "source_subfolder" | ||
# https://github.com/bombela/backward-cpp/commit/7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch | ||
- patch_file: "patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch" | ||
base_path: "source_subfolder" | ||
# https://github.com/bombela/backward-cpp/commit/b7ffd640ec48ada93045f8c46fc65f823490819b.patch | ||
- patch_file: "patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch" | ||
base_path: "source_subfolder" |
Oops, something went wrong.