From fb90c5e78eccd8d7444fcc665fe4e522024d9a89 Mon Sep 17 00:00:00 2001 From: Edgar Date: Fri, 6 Aug 2021 17:35:50 +0200 Subject: [PATCH] :bug: Fixed MyGUI build on windows --- .gitignore | 2 +- mygui/all/conandata.yml | 1 + mygui/all/patches/3.4.0/AddLibPNG.patch | 27 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 mygui/all/patches/3.4.0/AddLibPNG.patch diff --git a/.gitignore b/.gitignore index e82ac71..de16fea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ build/ tmp/ -upload.sh \ No newline at end of file +upload.* \ No newline at end of file diff --git a/mygui/all/conandata.yml b/mygui/all/conandata.yml index 0400c19..3c43665 100644 --- a/mygui/all/conandata.yml +++ b/mygui/all/conandata.yml @@ -5,6 +5,7 @@ sources: patches: "3.4.0": - patch_file: "patches/3.4.0/CMakeLists.txt.patch" + - patch_file: "patches/3.4.0/AddLibPNG.patch" requirements: - "ogre3d/[1.x]@anotherfoxguy/stable" - "freetype/[2.x]" diff --git a/mygui/all/patches/3.4.0/AddLibPNG.patch b/mygui/all/patches/3.4.0/AddLibPNG.patch new file mode 100644 index 0000000..6016955 --- /dev/null +++ b/mygui/all/patches/3.4.0/AddLibPNG.patch @@ -0,0 +1,27 @@ +--- 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()