[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.
This commit is contained in:
Peter Johnson
2021-05-10 18:59:14 -07:00
committed by GitHub
parent 44ad67ca8c
commit 561d53885e
6 changed files with 19 additions and 19 deletions

View File

@@ -5,5 +5,5 @@ repositories {
}
}
dependencies {
implementation "edu.wpi.first:native-utils:2021.1.1"
implementation "edu.wpi.first:native-utils:2022.0.0"
}

View File

@@ -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

View File

@@ -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 "$<BUILD_INTERFACE:${imgui_srcdir}>" "$<BUILD_INTERFACE:${imgui_srcdir}/misc/cpp>" "$<BUILD_INTERFACE:${implot_srcdir}>" "$<BUILD_INTERFACE:${imgui_srcdir}/examples>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/stb-src>")
target_include_directories(imgui PUBLIC "$<BUILD_INTERFACE:${imgui_srcdir}>" "$<BUILD_INTERFACE:${imgui_srcdir}/misc/cpp>" "$<BUILD_INTERFACE:${implot_srcdir}>" "$<BUILD_INTERFACE:${imgui_srcdir}/backends>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/stb-src>")
set_property(TARGET imgui PROPERTY POSITION_INDEPENDENT_CODE ON)
target_compile_features(imgui PUBLIC cxx_std_17)

View File

@@ -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 ""

View File

@@ -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"
}
}

View File

@@ -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"
}
}
}