aboutsummaryrefslogtreecommitdiff
path: root/ports/ogre/fix-findimgui.patch
diff options
context:
space:
mode:
authorLong Huan <8551701+longhuan2018@users.noreply.github.com>2020-10-14 04:23:43 +0800
committerGitHub <noreply@github.com>2020-10-13 13:23:43 -0700
commit8e40ffc03f2ec4d5a388455f8f4a6bf249bced26 (patch)
tree46755ded59eca13ba96e1e513b0fc55eff334661 /ports/ogre/fix-findimgui.patch
parentff41de2fd2a11d000809836ef661a6dff1dde024 (diff)
downloadvcpkg-8e40ffc03f2ec4d5a388455f8f4a6bf249bced26.tar.gz
vcpkg-8e40ffc03f2ec4d5a388455f8f4a6bf249bced26.zip
update ogre to 1.12.9 (#14006)
fix Bites error
Diffstat (limited to 'ports/ogre/fix-findimgui.patch')
-rw-r--r--ports/ogre/fix-findimgui.patch56
1 files changed, 43 insertions, 13 deletions
diff --git a/ports/ogre/fix-findimgui.patch b/ports/ogre/fix-findimgui.patch
index efd30d061..8e812d926 100644
--- a/ports/ogre/fix-findimgui.patch
+++ b/ports/ogre/fix-findimgui.patch
@@ -1,28 +1,41 @@
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
-index 1cea873..d3e756e 100644
+index df8f32af4..42be1e8f2 100644
--- a/Components/Overlay/CMakeLists.txt
+++ b/Components/Overlay/CMakeLists.txt
-@@ -19,12 +19,8 @@ list(APPEND HEADER_FILES
+@@ -19,21 +19,8 @@ list(APPEND HEADER_FILES
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+- set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.77" CACHE PATH "")
+- if(NOT EXISTS ${IMGUI_DIR})
+- message(STATUS "Dowloading imgui")
+- file(DOWNLOAD
+- https://github.com/ocornut/imgui/archive/v1.77.tar.gz
+- ${PROJECT_BINARY_DIR}/imgui.tar.gz)
+- execute_process(COMMAND ${CMAKE_COMMAND}
+- -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
+- endif()
- list(APPEND SOURCE_FILES
-- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui.cpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_draw.cpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_widgets.cpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_demo.cpp
-- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/misc/freetype/imgui_freetype.cpp)
-+ find_package(imgui CONFIG REQUIRED)
-+ find_path(IMGUI_INCLUDE_DIR imgui.h)
+- ${IMGUI_DIR}/imgui.cpp
+- ${IMGUI_DIR}/imgui_draw.cpp
+- ${IMGUI_DIR}/imgui_widgets.cpp
+- ${IMGUI_DIR}/imgui_demo.cpp
+- ${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp)
++ find_package(imgui CONFIG REQUIRED)
++ find_path(IMGUI_INCLUDE_DIR imgui.h)
else()
list(REMOVE_ITEM SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreImGuiOverlay.cpp")
endif()
-@@ -32,13 +28,13 @@ endif()
+@@ -41,13 +28,17 @@ endif()
# setup target
add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${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} ZLIB::ZLIB imgui::imgui)
++if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
++ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB imgui::imgui)
++else()
++ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB)
++endif()
target_include_directories(OgreOverlay PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include/OGRE/Overlay>
@@ -31,5 +44,22 @@ index 1cea873..d3e756e 100644
-if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+if(0)
target_include_directories(OgreOverlay PUBLIC
- PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/imgui>"
- PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/misc/freetype>")
+ PUBLIC "$<BUILD_INTERFACE:${IMGUI_DIR}>"
+ PRIVATE "$<BUILD_INTERFACE:${IMGUI_DIR}/misc/freetype>")
+diff --git "a/Components/Bites/CMakeLists.txt" "b/Components/Bites/CMakeLists.txt"
+index 5d58a8d74..fe41e4a28 100644
+--- "a/Components/Bites/CMakeLists.txt"
++++ "b/Components/Bites/CMakeLists.txt"
+@@ -152,6 +152,11 @@ elseif(NOT EMSCRIPTEN)
+ message(WARNING "SDL2 not found - no input handling and reduced window creation capabilites")
+ endif()
+
++if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
++ find_package(imgui CONFIG REQUIRED)
++ target_link_libraries(OgreBites PRIVATE imgui::imgui)
++endif()
++
+ generate_export_header(OgreBites
+ EXPORT_MACRO_NAME _OgreBitesExport
+ EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreBitesPrerequisites.h)
+