From 642ef3dcd6e22553ed95ec6af73e82b66a31e065 Mon Sep 17 00:00:00 2001 From: Edgar Date: Fri, 6 Aug 2021 17:18:52 +0200 Subject: [PATCH] :bug: Fixed OGRE build on windows --- ogre/1.11/conandata.yml | 3 +- ogre/1.11/patches/1.11.6.1/AddLibPNG.patch | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ogre/1.11/patches/1.11.6.1/AddLibPNG.patch diff --git a/ogre/1.11/conandata.yml b/ogre/1.11/conandata.yml index e93eb52..f22f168 100644 --- a/ogre/1.11/conandata.yml +++ b/ogre/1.11/conandata.yml @@ -1,12 +1,13 @@ sources: "1.11.6.1": url: "https://github.com/AnotherFoxGuy/ogre/archive/refs/tags/1.11.6.1.tar.gz" - sha256: "e58f2fc55bad64f75a43b309ccfaccdb0b9889fbed20547e51f10d7d4824ab9f" + sha256: "31c84051ffe9a3710c553cfa27ebda7b176c9dfe3b4d2a113d4f02caf48ecd5b" patches: "1.11.6.1": - patch_file: "patches/1.11.6.1/CMakeLists.txt.patch" - patch_file: "patches/1.11.6.1/Dependencies.cmake.patch" - patch_file: "patches/1.11.6.1/Samples-CMakeList.txt.patch" + - patch_file: "patches/1.11.6.1/AddLibPNG.patch" requirements: - "zlib/[1.x]" - "zziplib/[0.13.x]" diff --git a/ogre/1.11/patches/1.11.6.1/AddLibPNG.patch b/ogre/1.11/patches/1.11.6.1/AddLibPNG.patch new file mode 100644 index 0000000..7b84ddb --- /dev/null +++ b/ogre/1.11/patches/1.11.6.1/AddLibPNG.patch @@ -0,0 +1,32 @@ +--- Components/Overlay/CMakeLists.txt ++++ Components/Overlay/CMakeLists.txt +@@ -11,6 +11,20 @@ + # Overlay optional component + ############################################################ + ++# 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() ++ + # define header and source files for the library + file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") + list(APPEND HEADER_FILES +@@ -21,7 +35,7 @@ + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB) ++target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ${PNG_LIBRARIES} ${BZIP2_LIBRARIES} ${BROTLI_LIBRARIES} ZLIB::ZLIB) + target_include_directories(OgreOverlay PUBLIC + "$" + $