From 561d53885edb68149f94f76867ca409808b4b971 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 10 May 2021 18:59:14 -0700 Subject: [PATCH] [build] Update opencv to 4.5.2, imgui/implot to latest (#3344) Also update native-utils to 2022.0.0 to start pulling 2022 artifacts. --- buildSrc/build.gradle | 2 +- glass/src/lib/native/cpp/other/Plot.cpp | 4 ++-- imgui/CMakeLists.txt | 10 +++++----- imgui/CMakeLists.txt.in | 10 +++++----- shared/config.gradle | 4 ++-- shared/opencv.gradle | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 60dcb613ef..be69e7c1c7 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,5 +5,5 @@ repositories { } } dependencies { - implementation "edu.wpi.first:native-utils:2021.1.1" + implementation "edu.wpi.first:native-utils:2022.0.0" } diff --git a/glass/src/lib/native/cpp/other/Plot.cpp b/glass/src/lib/native/cpp/other/Plot.cpp index ebb132aef2..7faa54ad11 100644 --- a/glass/src/lib/native/cpp/other/Plot.cpp +++ b/glass/src/lib/native/cpp/other/Plot.cpp @@ -369,9 +369,9 @@ PlotSeries::Action PlotSeries::EmitPlot(PlotView& view, double now, size_t i, } // DND source for PlotSeries - if (ImPlot::BeginLegendDragDropSource(label)) { + if (ImPlot::BeginDragDropSourceItem(label)) { EmitDragDropPayload(view, i, plotIndex); - ImPlot::EndLegendDragDropSource(); + ImPlot::EndDragDropSource(); } // Show full source name tooltip diff --git a/imgui/CMakeLists.txt b/imgui/CMakeLists.txt index afb96eac74..9f2ac74249 100644 --- a/imgui/CMakeLists.txt +++ b/imgui/CMakeLists.txt @@ -54,21 +54,21 @@ set(imgui_srcdir ${CMAKE_CURRENT_BINARY_DIR}/imgui-src) file(GLOB imgui_sources ${imgui_srcdir}/*.cpp ${imgui_srcdir}/misc/cpp/*.cpp) set(implot_srcdir ${CMAKE_CURRENT_BINARY_DIR}/implot-src) file(GLOB implot_sources ${implot_srcdir}/*.cpp) -add_library(imgui STATIC ${imgui_sources} ${implot_sources} ${imgui_srcdir}/examples/imgui_impl_glfw.cpp ${imgui_srcdir}/examples/imgui_impl_opengl3.cpp ${CMAKE_CURRENT_BINARY_DIR}/imgui_ProggyDotted.cpp ${CMAKE_CURRENT_BINARY_DIR}/stb_image.cpp) +add_library(imgui STATIC ${imgui_sources} ${implot_sources} ${imgui_srcdir}/backends/imgui_impl_glfw.cpp ${imgui_srcdir}/backends/imgui_impl_opengl3.cpp ${CMAKE_CURRENT_BINARY_DIR}/imgui_ProggyDotted.cpp ${CMAKE_CURRENT_BINARY_DIR}/stb_image.cpp) target_compile_definitions(imgui PUBLIC IMGUI_IMPL_OPENGL_LOADER_GL3W) if (MSVC) - target_sources(imgui PRIVATE ${imgui_srcdir}/examples/imgui_impl_dx11.cpp) + target_sources(imgui PRIVATE ${imgui_srcdir}/backends/imgui_impl_dx11.cpp) else() if (APPLE) target_compile_options(imgui PRIVATE -fobjc-arc) set_target_properties(imgui PROPERTIES LINK_FLAGS "-framework Metal -framework QuartzCore") - target_sources(imgui PRIVATE ${imgui_srcdir}/examples/imgui_impl_metal.mm) + target_sources(imgui PRIVATE ${imgui_srcdir}/backends/imgui_impl_metal.mm) else() - #target_sources(imgui PRIVATE ${imgui_srcdir}/examples/imgui_impl_opengl3.cpp) + #target_sources(imgui PRIVATE ${imgui_srcdir}/backends/imgui_impl_opengl3.cpp) endif() endif() target_link_libraries(imgui PUBLIC gl3w glfw) -target_include_directories(imgui PUBLIC "$" "$" "$" "$" "$" "$") +target_include_directories(imgui PUBLIC "$" "$" "$" "$" "$" "$") set_property(TARGET imgui PROPERTY POSITION_INDEPENDENT_CODE ON) target_compile_features(imgui PUBLIC cxx_std_17) diff --git a/imgui/CMakeLists.txt.in b/imgui/CMakeLists.txt.in index 0016ae6f40..be649d0b35 100644 --- a/imgui/CMakeLists.txt.in +++ b/imgui/CMakeLists.txt.in @@ -5,7 +5,7 @@ project(imgui-download NONE) include(ExternalProject) ExternalProject_Add(glfw3 GIT_REPOSITORY https://github.com/glfw/glfw.git - GIT_TAG 2a5ac9a6d6cbe9f4113c0f17158cb13ab7f263bf + GIT_TAG 3.3.4 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/glfw-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/glfw-build" CONFIGURE_COMMAND "" @@ -15,7 +15,7 @@ ExternalProject_Add(glfw3 ) ExternalProject_Add(gl3w GIT_REPOSITORY https://github.com/skaslev/gl3w - GIT_TAG 7729692af8a2322cddb636b90393a42c130b1c85 + GIT_TAG 8418c1b38d195edbd3b20a8f13ec91de6c8c570c SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/gl3w-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gl3w-build" INSTALL_COMMAND "" @@ -23,7 +23,7 @@ ExternalProject_Add(gl3w ) ExternalProject_Add(imgui GIT_REPOSITORY https://github.com/ocornut/imgui.git - GIT_TAG v1.79 + GIT_TAG v1.82 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/imgui-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/imgui-build" CONFIGURE_COMMAND "" @@ -33,7 +33,7 @@ ExternalProject_Add(imgui ) ExternalProject_Add(implot GIT_REPOSITORY https://github.com/epezent/implot.git - GIT_TAG a6bab98517b1baa3116db52518dda1eb2d7eaab7 + GIT_TAG 555ff688a8134bc0c602123149abe9c17d577475 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/implot-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/implot-build" CONFIGURE_COMMAND "" @@ -53,7 +53,7 @@ ExternalProject_Add(proggyfonts ) ExternalProject_Add(stb GIT_REPOSITORY https://github.com/nothings/stb.git - GIT_TAG f54acd4e13430c5122cab4ca657705c84aa61b08 + GIT_TAG c9064e317699d2e495f36ba4f9ac037e88ee371a SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/stb-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/stb-build" CONFIGURE_COMMAND "" diff --git a/shared/config.gradle b/shared/config.gradle index 84e4a6186b..36ca327efe 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -9,9 +9,9 @@ nativeUtils { configureDependencies { wpiVersion = "-1" niLibVersion = "2020.10.1" - opencvVersion = "3.4.7-5" + opencvVersion = "4.5.2-1" googleTestVersion = "1.9.0-5-437e100-1" - imguiVersion = "1.79-2" + imguiVersion = "1.82-1" wpimathVersion = "-1" } } diff --git a/shared/opencv.gradle b/shared/opencv.gradle index 86151c112d..ef7715d4a6 100644 --- a/shared/opencv.gradle +++ b/shared/opencv.gradle @@ -1,4 +1,4 @@ -def opencvVersion = '3.4.7-5' +def opencvVersion = '4.5.2-1' if (project.hasProperty('useCpp') && project.useCpp) { model { @@ -22,12 +22,12 @@ if (project.hasProperty('useCpp') && project.useCpp) { if (project.hasProperty('useJava') && project.useJava) { dependencies { - implementation "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}" if (!project.hasProperty('skipDev') || !project.skipDev) { - devImplementation "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}" + devImplementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}" } if (project.hasProperty('useDocumentation') && project.useDocumentation) { - javaSource "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}:sources" + javaSource "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}:sources" } } }