🎉 Added OGRE

This commit is contained in:
Edgar 2021-08-04 15:16:15 +00:00 committed by GitHub
parent c5a7393266
commit 8cd34e3ed7
5 changed files with 111 additions and 0 deletions

15
ogre/all/conandata.yml Normal file
View File

@ -0,0 +1,15 @@
sources:
"1.11.6.1":
url: "https://cdn.anotherfoxguy.com/ogre-1.11.6-with-patches.zip"
sha256: "e58f2fc55bad64f75a43b309ccfaccdb0b9889fbed20547e51f10d7d4824ab9f"
patches:
"1.11.6.1":
- patch_file: "patches/1.11.6.1/CMakeLists.txt.patch"
- patch_file: "patches/1.11.6.1/Dependencies.cmake.patch"
requirements:
- "zlib/[1.x]"
- "zziplib/[0.13.x]"
- "freetype/[2.x]"
- "freeimage/[3.x]@anotherfoxguy/stable"
- "cg-toolkit/3.1@anotherfoxguy/stable"
- "pugixml/[1.x]"

71
ogre/all/conanfile.py Normal file
View File

@ -0,0 +1,71 @@
from conans import ConanFile, CMake, tools
from conans.tools import os_info, SystemPackageTool
class OGREConan(ConanFile):
name = "ogre3d"
license = "MIT"
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
description = "scene-oriented, flexible 3D engine written in C++"
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_paths"
exports_sources = "patches/**"
def requirements(self):
for req in self.conan_data["requirements"]:
self.requires(req)
def system_requirements(self):
if os_info.is_linux:
if os_info.with_apt:
installer = SystemPackageTool()
installer.install("libx11-dev")
installer.install("libxaw7-dev")
def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
def build(self):
cmake = CMake(self)
cmake.definitions["OGRE_BUILD_DEPENDENCIES"] = "OFF"
cmake.definitions["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "OFF"
cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
if os_info.is_windows:
cmake.definitions["CMAKE_CXX_FLAGS"] = "-D_OGRE_FILESYSTEM_ARCHIVE_UNICODE"
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.includedirs = [
"include",
"include/OGRE",
"include/OGRE/Bites",
"include/OGRE/HLMS",
"include/OGRE/MeshLodGenerator",
"include/OGRE/Overlay",
"include/OGRE/Paging",
"include/OGRE/Plugins",
"include/OGRE/Property",
"include/OGRE/RenderSystems",
"include/OGRE/RTShaderSystem",
"include/OGRE/Terrain",
"include/OGRE/Threading",
"include/OGRE/Volume",
]
self.cpp_info.libs = tools.collect_libs(self)

View File

@ -0,0 +1,11 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -16,6 +16,8 @@
cmake_minimum_required(VERSION 3.3.0)
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
+
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

View File

@ -0,0 +1,11 @@
--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -13,7 +13,7 @@
# OGRE_DEPENDENCIES_DIR can be used to specify a single base
# folder where the required dependencies may be found.
-set(OGRE_DEPENDENCIES_DIR "" CACHE PATH "Path to prebuilt OGRE dependencies")
+set(OGRE_DEPENDENCIES_DIR ${CMAKE_PREFIX_PATH})
option(OGRE_BUILD_DEPENDENCIES "automatically build Ogre Dependencies (freetype, zzip)" TRUE)
include(FindPkgMacros)

3
ogre/config.yml Normal file
View File

@ -0,0 +1,3 @@
versions:
"3.4.0":
folder: all