diff --git a/mygui/all/conandata.yml b/mygui/all/conandata.yml new file mode 100644 index 0000000..0400c19 --- /dev/null +++ b/mygui/all/conandata.yml @@ -0,0 +1,11 @@ +sources: + "3.4.0": + url: "https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.0.tar.gz" + sha256: "d1d5f294670ae71f7200ed4b30859018281d8cfd45d6a38d18b97a4aba604c42" +patches: + "3.4.0": + - patch_file: "patches/3.4.0/CMakeLists.txt.patch" +requirements: + - "ogre3d/[1.x]@anotherfoxguy/stable" + - "freetype/[2.x]" + - "zlib/[1.x]" \ No newline at end of file diff --git a/mygui/all/conanfile.py b/mygui/all/conanfile.py new file mode 100644 index 0000000..740db3c --- /dev/null +++ b/mygui/all/conanfile.py @@ -0,0 +1,42 @@ +from conans import ConanFile, CMake, tools +from conans.tools import os_info, SystemPackageTool + + +class MyGUIConan(ConanFile): + name = "mygui" + license = "MIT" + url = "https://github.com/AnotherFoxGuy/conan-MyGUI" + description = "Fast, flexible and simple GUI." + 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 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['MYGUI_BUILD_DEMOS'] = 'OFF' + cmake.definitions['MYGUI_BUILD_DOCS'] = 'OFF' + cmake.definitions['MYGUI_BUILD_TEST_APP'] = 'OFF' + cmake.definitions['MYGUI_BUILD_PLUGINS'] = 'OFF' + cmake.definitions['MYGUI_BUILD_TOOLS'] = 'OFF' + cmake.definitions['MYGUI_RENDERSYSTEM'] = '3' + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.includedirs = ['include/MYGUI'] + # Directories where libraries can be found + self.cpp_info.libdirs = ['lib', 'lib/release', 'lib/debug'] + self.cpp_info.libs = tools.collect_libs(self) diff --git a/mygui/all/patches/3.4.0/CMakeLists.txt.patch b/mygui/all/patches/3.4.0/CMakeLists.txt.patch new file mode 100644 index 0000000..5bbb085 --- /dev/null +++ b/mygui/all/patches/3.4.0/CMakeLists.txt.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -11,6 +11,8 @@ + + project(MYGUI) + ++include(${CMAKE_BINARY_DIR}/conan_paths.cmake) ++ + # Include necessary submodules + set(CMAKE_MODULE_PATH + "${MYGUI_SOURCE_DIR}/CMake" diff --git a/mygui/config.yml b/mygui/config.yml new file mode 100644 index 0000000..bc61499 --- /dev/null +++ b/mygui/config.yml @@ -0,0 +1,3 @@ +versions: + "3.4.0": + folder: all