🔨 Reduce amount of patches for MyGUI
This commit is contained in:
parent
545b386cf6
commit
87febdff3c
@ -8,10 +8,8 @@ sources:
|
|||||||
patches:
|
patches:
|
||||||
"3.4.0":
|
"3.4.0":
|
||||||
- patch_file: "patches/3.4.0/CMakeLists.txt.patch"
|
- patch_file: "patches/3.4.0/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/3.4.0/AddLibPNG.patch"
|
|
||||||
"3.4.1":
|
"3.4.1":
|
||||||
- patch_file: "patches/3.4.1/CMakeLists.txt.patch"
|
- patch_file: "patches/3.4.1/CMakeLists.txt.patch"
|
||||||
- patch_file: "patches/3.4.1/AddLibPNG.patch"
|
|
||||||
requirements:
|
requirements:
|
||||||
- "ogre3d/[1.x]@anotherfoxguy/stable"
|
- "ogre3d/[1.x]@anotherfoxguy/stable"
|
||||||
- "freetype/[2.x]"
|
- "freetype/[2.x]"
|
||||||
|
@ -8,15 +8,19 @@ class MyGUIConan(ConanFile):
|
|||||||
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
url = "https://github.com/AnotherFoxGuy/conan-MyGUI"
|
||||||
description = "Fast, flexible and simple GUI."
|
description = "Fast, flexible and simple GUI."
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
generators = "cmake_paths"
|
generators = "cmake_paths", "cmake_find_package"
|
||||||
exports_sources = "patches/**"
|
exports_sources = "patches/**"
|
||||||
|
options = {"system_ogre": [True, False]}
|
||||||
|
default_options = {"system_ogre": False}
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
|
if not self.options.system_ogre:
|
||||||
for req in self.conan_data["requirements"]:
|
for req in self.conan_data["requirements"]:
|
||||||
self.requires(req)
|
self.requires(req)
|
||||||
|
|
||||||
def source(self):
|
def source(self):
|
||||||
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
tools.get(**self.conan_data["sources"][self.version], strip_root=True)
|
||||||
|
if not self.options.system_ogre:
|
||||||
for patch in self.conan_data["patches"][self.version]:
|
for patch in self.conan_data["patches"][self.version]:
|
||||||
tools.patch(**patch)
|
tools.patch(**patch)
|
||||||
|
|
||||||
@ -42,4 +46,5 @@ class MyGUIConan(ConanFile):
|
|||||||
self.cpp_info.libs = tools.collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
|
if not self.options.system_ogre:
|
||||||
self.info.requires["ogre3d"].full_recipe_mode()
|
self.info.requires["ogre3d"].full_recipe_mode()
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
--- MyGUIEngine/CMakeLists.txt
|
|
||||||
+++ MyGUIEngine/CMakeLists.txt
|
|
||||||
@@ -41,8 +41,24 @@
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (MYGUI_USE_FREETYPE)
|
|
||||||
+ # FreeType from conan has seperate libraries
|
|
||||||
+ find_package(PNG)
|
|
||||||
+ find_package(BZip2)
|
|
||||||
+
|
|
||||||
+ find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static)
|
|
||||||
+ find_library(BROTLIDEC_LIBRARY NAMES brotlidec brotlidec-static)
|
|
||||||
+
|
|
||||||
+ if(NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLICOMMON_LIBRARY-NOTFOUND" AND NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLIDEC_LIBRARY-NOTFOUND")
|
|
||||||
+ set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
|
||||||
+ message(STATUS "Brotli libraries found: ${BROTLI_LIBRARIES}")
|
|
||||||
+ else()
|
|
||||||
+ message(WARNING "Brotli library not found: ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY}")
|
|
||||||
+ endif()
|
|
||||||
target_link_libraries(${PROJECTNAME}
|
|
||||||
${FREETYPE_LIBRARIES}
|
|
||||||
+ ${PNG_LIBRARIES}
|
|
||||||
+ ${BZIP2_LIBRARIES}
|
|
||||||
+ ${BROTLI_LIBRARIES}
|
|
||||||
${ZLIB_LIBRARIES}
|
|
||||||
)
|
|
||||||
endif()
|
|
@ -1,6 +1,6 @@
|
|||||||
--- CMakeLists.txt
|
--- CMakeLists.txt
|
||||||
+++ CMakeLists.txt
|
+++ CMakeLists.txt
|
||||||
@@ -11,6 +11,8 @@
|
@@ -11,8 +11,11 @@
|
||||||
|
|
||||||
project(MYGUI)
|
project(MYGUI)
|
||||||
|
|
||||||
@ -8,4 +8,7 @@
|
|||||||
+
|
+
|
||||||
# Include necessary submodules
|
# Include necessary submodules
|
||||||
set(CMAKE_MODULE_PATH
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
"${MYGUI_SOURCE_DIR}/CMake"
|
"${MYGUI_SOURCE_DIR}/CMake"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Packages"
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
--- MyGUIEngine/CMakeLists.txt
|
|
||||||
+++ MyGUIEngine/CMakeLists.txt
|
|
||||||
@@ -1,5 +1,19 @@
|
|
||||||
set (PROJECTNAME MyGUIEngine)
|
|
||||||
|
|
||||||
+# FreeType from conan has seperate libraries
|
|
||||||
+find_package(PNG)
|
|
||||||
+find_package(BZip2)
|
|
||||||
+
|
|
||||||
+find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static)
|
|
||||||
+find_library(BROTLIDEC_LIBRARY NAMES brotlidec brotlidec-static)
|
|
||||||
+
|
|
||||||
+if(NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLICOMMON_LIBRARY-NOTFOUND" AND NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLIDEC_LIBRARY-NOTFOUND")
|
|
||||||
+ set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
|
||||||
+ message(STATUS "Brotli libraries found: ${BROTLI_LIBRARIES}")
|
|
||||||
+else()
|
|
||||||
+ message(WARNING "Brotli library not found: ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY}")
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
project( ${PROJECTNAME} )
|
|
||||||
|
|
||||||
include(${PROJECTNAME}.list)
|
|
||||||
@@ -42,10 +56,12 @@
|
|
||||||
target_link_libraries(${PROJECTNAME} msdfgen)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
- target_link_libraries(${PROJECTNAME} ${FREETYPE_LIBRARIES})
|
|
||||||
- if (ZLIB_FOUND) # hacky way to check if freetype was built with zlib
|
|
||||||
- target_link_libraries(${PROJECTNAME} ${ZLIB_LIBRARIES})
|
|
||||||
- endif()
|
|
||||||
+ target_link_libraries(${PROJECTNAME}
|
|
||||||
+ ${PNG_LIBRARIES}
|
|
||||||
+ ${BZIP2_LIBRARIES}
|
|
||||||
+ ${BROTLI_LIBRARIES}
|
|
||||||
+ ${FREETYPE_LIBRARIES})
|
|
||||||
+
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# platform specific dependencies
|
|
@ -1,12 +1,14 @@
|
|||||||
--- CMakeLists.txt
|
--- CMakeLists.txt
|
||||||
+++ CMakeLists.txt
|
+++ CMakeLists.txt
|
||||||
@@ -20,6 +20,8 @@
|
@@ -22,8 +22,11 @@
|
||||||
cmake_policy(SET CMP0083 NEW)
|
|
||||||
endif()
|
project(MYGUI)
|
||||||
|
|
||||||
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
+include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
||||||
+
|
+
|
||||||
project(MYGUI)
|
|
||||||
|
|
||||||
# Include necessary submodules
|
# Include necessary submodules
|
||||||
|
set(CMAKE_MODULE_PATH
|
||||||
|
+ "${CMAKE_BINARY_DIR}"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Utils"
|
||||||
|
"${MYGUI_SOURCE_DIR}/CMake/Packages"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user