🎉 Added mygui-next
This commit is contained in:
parent
cbe26696c0
commit
b8ed6c8f6c
4
mygui/next/conandata.yml
Normal file
4
mygui/next/conandata.yml
Normal file
@ -0,0 +1,4 @@
|
||||
sources:
|
||||
"2022.10":
|
||||
url: "https://github.com/cryham/mygui-next/archive/3f1194e5075078f0a9428b052f97749486b6fd72.tar.gz"
|
||||
sha256: "13f084a95e9e22bbb1f1d216b55527fd03f4a4e525484e45b97f98ba307732a4"
|
83
mygui/next/conanfile.py
Normal file
83
mygui/next/conanfile.py
Normal file
@ -0,0 +1,83 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.files import get, collect_libs, replace_in_file
|
||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
||||
import os
|
||||
|
||||
|
||||
class MyGUIConan(ConanFile):
|
||||
name = "mygui-next"
|
||||
license = "MIT"
|
||||
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
||||
description = "Fast, flexible and simple GUI."
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {"system_ogre": [True, False]}
|
||||
default_options = {"system_ogre": False}
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def requirements(self):
|
||||
if not self.options.system_ogre:
|
||||
# self.requires("ogre3d-next/[2.x]@anotherfoxguy/stable")
|
||||
self.requires("ogre3d-next/2023.01@anotherfoxguy/testing")
|
||||
|
||||
def source(self):
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.variables["MYGUI_BUILD_DEMOS"] = "OFF"
|
||||
tc.variables["MYGUI_BUILD_DOCS"] = "OFF"
|
||||
tc.variables["MYGUI_BUILD_TEST_APP"] = "OFF"
|
||||
tc.variables["MYGUI_BUILD_PLUGINS"] = "OFF"
|
||||
tc.variables["MYGUI_BUILD_TOOLS"] = "OFF"
|
||||
tc.variables["MYGUI_DONT_USE_OBSOLETE"] = "OFF"
|
||||
tc.variables["MYGUI_USE_FREETYPE"] = "ON"
|
||||
tc.variables["MYGUI_RENDERSYSTEM"] = "8"
|
||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
||||
tc.variables["OIS_BUILD_DEMOS"] = "OFF"
|
||||
tc.generate()
|
||||
deps = CMakeDeps(self)
|
||||
deps.generate()
|
||||
|
||||
def _patch_sources(self):
|
||||
replace_in_file(self,
|
||||
os.path.join(self.source_folder, "MyGUIEngine/CMakeLists.txt"),
|
||||
"${FREETYPE_LIBRARIES}",
|
||||
"freetype",
|
||||
)
|
||||
replace_in_file(self,
|
||||
os.path.join(self.source_folder, "CMakeLists.txt"),
|
||||
"# Find dependencies",
|
||||
"find_package(OGRE REQUIRED)",
|
||||
)
|
||||
replace_in_file(self,
|
||||
os.path.join(self.source_folder, "Platforms/Ogre2/Ogre2Platform/CMakeLists.txt"),
|
||||
"${OGRE_LIBRARIES}",
|
||||
"OGRE::OGRE",
|
||||
)
|
||||
|
||||
def build(self):
|
||||
self._patch_sources()
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def package(self):
|
||||
cmake = CMake(self)
|
||||
cmake.install()
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.set_property("cmake_module_file_name", "MyGUI")
|
||||
self.cpp_info.set_property("cmake_module_target_name", "MyGUI::MyGUI")
|
||||
self.cpp_info.set_property("cmake_file_name", "MyGUI")
|
||||
self.cpp_info.set_property("cmake_target_name", "MyGUI::MyGUI")
|
||||
self.cpp_info.includedirs = ['include/MYGUI']
|
||||
# Directories where libraries can be found
|
||||
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
||||
self.cpp_info.libs = collect_libs(self)
|
||||
|
||||
def package_id(self):
|
||||
if not self.options.system_ogre:
|
||||
self.info.requires["ogre3d-next"].full_recipe_mode()
|
@ -2,3 +2,6 @@ sources:
|
||||
"2022.10":
|
||||
url: "https://github.com/OGRECave/ogre-next/archive/ede1690bb3dcf932df6a06f06e9e6de585e5eeea.tar.gz"
|
||||
sha256: "6baf05cc4dc14cb70b6f4a958dbc7ac79a209eb9658733d0b19f651a5f96da08"
|
||||
"2023.01":
|
||||
url: "https://github.com/OGRECave/ogre-next/archive/186ea7ee972860ed09bcdbcdd99f609348c6aa8b.tar.gz"
|
||||
sha256: "38a93399b5ce2b053894e858cafa3830118ff938f40204c727a77c9233744e8f"
|
@ -49,6 +49,7 @@ class OGRENextConan(ConanFile):
|
||||
tc.variables["OGRE_BUILD_COMPONENT_OVERLAY_IMGUI"] = "ON"
|
||||
tc.variables["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
||||
tc.variables["OGRE_BUILD_COMPONENT_TERRAIN"] = "ON"
|
||||
#tc.variables["OGRE_BUILD_COMPONENT_PAGING"] = "ON" # Completly broken
|
||||
tc.variables["OGRE_BUILD_DEPENDENCIES"] = "OFF"
|
||||
tc.variables["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
|
||||
tc.variables["OGRE_BUILD_PLUGIN_EXRCODEC"] = "OFF"
|
||||
@ -113,25 +114,23 @@ class OGRENextConan(ConanFile):
|
||||
"include/OGRE",
|
||||
"include/OGRE/Animation",
|
||||
"include/OGRE/Atmosphere",
|
||||
"include/OGRE/Bites",
|
||||
"include/OGRE/CommandBuffer",
|
||||
"include/OGRE/Compositor",
|
||||
"include/OGRE/Deprecated",
|
||||
"include/OGRE/HLMS",
|
||||
"include/OGRE/HLMS/Common",
|
||||
"include/OGRE/HLMS/Pbs",
|
||||
"include/OGRE/HLMS/Unlit",
|
||||
"include/OGRE/Compute",
|
||||
"include/OGRE/Hash",
|
||||
"include/OGRE/Hlms",
|
||||
"include/OGRE/Hlms/Common",
|
||||
"include/OGRE/Hlms/Pbs",
|
||||
"include/OGRE/Hlms/Unlit",
|
||||
"include/OGRE/Math",
|
||||
"include/OGRE/MeshLodGenerator",
|
||||
"include/OGRE/ogrestd",
|
||||
"include/OGRE/Overlay",
|
||||
"include/OGRE/Paging",
|
||||
"include/OGRE/Plugins",
|
||||
"include/OGRE/Property",
|
||||
"include/OGRE/RTShaderSystem",
|
||||
"include/OGRE/RenderSystems",
|
||||
"include/OGRE/Terrain",
|
||||
"include/OGRE/SceneFormat",
|
||||
"include/OGRE/Threading",
|
||||
"include/OGRE/Threading",
|
||||
"include/OGRE/Volume",
|
||||
"include/OGRE/Vao",
|
||||
]
|
||||
# Directories where libraries can be found
|
||||
self.cpp_info.libdirs = ['lib', f'lib/{self.settings.build_type}']
|
||||
|
Loading…
x
Reference in New Issue
Block a user