Skip to content

Commit abd1944

Browse files
ggulguliauilianriesericLemanissier
authored
(#11102) recipe OGRE
* feat: initial ogre recipe * fix: ogre component target names * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * fix: build, override openssl * fix: build * fix: build apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * fix: add xog system dependency * fix: add cppunit as requires and fixes 1. simplify tests 2. fix hooks warnings, comments and spaces * fix: cmake patches 1. find_package cppunit instead of CppUnit 2. install MurmurHash3.h in include/OGRE/Hash directory * fix: use egl for gl support * chore: apply review suggestions remove ogre_static from configure method Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * chore: apply review suggestions use self.options.shared instead of ogre_static for cmake defintions Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * fix: build apply review suggestions use egl/system conditionally Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * fix: apply reivew suggestions cache the result of _configure_cmake function * fix: append pthread system libs for linux os * fix: configure cmake function * chore: short_paths for windows * chore: limit build to compiler version less than 9 * feat: user ogre version 1.10.2 * fix: patch set OGRE_BINARY_DIR correctly * fix: zziplib patch * fix: lint error E9004, lower case references in conanfile.py * fix: keep only version 1.x data * fix: use glu/system dependency * chore: apply review suggestions not installing PDB Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * chore: apply review suggestions using build options in cmake definitions Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * fix: options in lower case, use options in configure_cmake function * fix: SDL2 library linking via patch * fix: conan hook error: final end line in patch file * chore: don't build samples * fix: setting off freeimage codec build, provide egl::egl in components.require * fix: correct error message in validate method * fix: copy licence * fix: copy correct licence from Docs folder * fix: copy licence, test package * fix: libname for debug mode, test pakage files * chore: correct git user data * chore: remove stray line in recipe * fix: static libname * fix: remove duplicate python component, shared dir * fix: ogre headers include package info * chore: apply review suggestions Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com> * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions patch sources in build method via a separate funciton Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions fix typo Co-authored-by: Uilian Ries <uilianries@gmail.com> * fix: import ConanException Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions Co-authored-by: Uilian Ries <uilianries@gmail.com> * chore: apply review suggestions use safer means to apply/inject min cpp standard Co-authored-by: Uilian Ries <uilianries@gmail.com> * fix: apply review suggestions, remvoe ogre_ prefix, change cxx standard to 11 * update: recipe with plugin component info and more 1. plugin component in package_info 2. bin dir in self.env_info * fix: remove invalid EXRCodec options and components * fix: limit build to clang 10 and less * fix: check boost components in conan recipe and remove unused variables Co-authored-by: Uilian Ries <uilianries@gmail.com> Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
1 parent 1ccaa11 commit abd1944

8 files changed

+969
-0
lines changed

recipes/ogre/1.x/CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cmake_minimum_required(VERSION 3.10.2)
2+
project(cmake_wrapper)
3+
4+
include(conanbuildinfo.cmake)
5+
conan_basic_setup(TARGETS)
6+
7+
add_subdirectory(source_subfolder)

recipes/ogre/1.x/conandata.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sources:
2+
"1.10.2":
3+
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v1.10.2.tar.gz"
4+
sha256: "db022c682376ace2abc45b42802048ad3a8458f5052cbc180b5fb470e4f06a53"
5+
patches:
6+
"1.10.2":
7+
- base_path: "source_subfolder"
8+
patch_file: "patches/0001-ogre-1.10.2-cmake-fixes.patch"

recipes/ogre/1.x/conanfile.py

+368
Large diffs are not rendered by default.

recipes/ogre/1.x/patches/0001-ogre-1.10.2-cmake-fixes.patch

+532
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(test_package)
3+
4+
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
5+
conan_basic_setup(KEEP_RPATHS)
6+
7+
8+
find_package(OGRE ${OGRE_VERSION} COMPONENTS OgreMain REQUIRED)
9+
add_executable(ogre_main ogre_main.cpp)
10+
target_link_libraries(ogre_main OGRE::OgreMain)
11+
12+
set_target_properties(ogre_main PROPERTIES
13+
CXX_STANDARD 11
14+
CXX_STANDARD_REQUIRED ON
15+
CXX_EXTENSIONS ON)
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from conans import ConanFile, CMake, tools
2+
import os
3+
4+
class TestPackageConan(ConanFile):
5+
settings = "os", "compiler", "build_type", "arch"
6+
generators = "cmake", "cmake_find_package"
7+
8+
def build(self):
9+
cmake = CMake(self)
10+
cmake.definitions["OGRE_VERSION"] = tools.Version(self.deps_cpp_info["ogre"].version)
11+
cmake.configure()
12+
cmake.build()
13+
14+
def test(self):
15+
if tools.cross_building(self):
16+
return
17+
18+
ogre_main_bin_path = os.path.join("bin", "ogre_main")
19+
self.run(ogre_main_bin_path, run_environment=True)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <OGRE/OgreRenderSystemCapabilities.h>
2+
#include <OGRE/OgreParticle.h>
3+
#include <OGRE/OgrePrerequisites.h>
4+
#include <iostream>
5+
6+
int main(int argc, char **argv) {
7+
Ogre::RenderSystemCapabilities rc;
8+
rc.setNumTextureUnits(10);
9+
std::cout << "Hello from OgreMain component\n";
10+
std::cout << "number of texture units: " << rc.getNumTextureUnits() << "\n";
11+
12+
Ogre::Radian rot{0.618};
13+
Ogre::Particle particle;
14+
particle.resetDimensions();
15+
16+
return 0;
17+
}

recipes/ogre/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
versions:
2+
"1.10.2":
3+
folder: 1.x

0 commit comments

Comments
 (0)