early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/include/mpark/variant.hpp b/include/mpark/variant.hpp
index fb2cf06..6debb99 100644
--- a/include/mpark/variant.hpp
+++ b/include/mpark/variant.hpp
@@ -243,7 +243,7 @@ namespace std {
#endif
#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304
-#define MPARK_CPP14_CONSTEXPR
+//#define MPARK_CPP14_CONSTEXPR
#endif
#if __has_feature(cxx_exceptions) || defined(__cpp_exceptions) || \

View File

@@ -0,0 +1,10 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e13110..6adf1e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.8)
project("Pangolin")
set(PANGOLIN_VERSION_MAJOR 0)
set(PANGOLIN_VERSION_MINOR 6)

View File

@@ -0,0 +1,97 @@
diff --git a/include/pangolin/gl/colour.h b/include/pangolin/gl/colour.h
index 92bedf4..8c3e542 100644
--- a/include/pangolin/gl/colour.h
+++ b/include/pangolin/gl/colour.h
@@ -28,6 +28,7 @@
#pragma once
#include <cmath>
+#include <limits>
#include <stdexcept>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ddeb144..ee27d57 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -299,7 +299,9 @@ if(BUILD_PANGOLIN_PYTHON AND BUILD_PANGOLIN_GUI AND BUILD_PANGOLIN_VARS AND NOT
if(pybind11_FOUND)
set(HAVE_PYTHON 1)
-
+ if (UNIX)
+ set(PYTHON_LIBRARY ${PYTHON_LIBRARY} dl util)
+ endif()
file(GLOB pypangolin_SRC "python/pypangolin/*.cpp" )
file(GLOB pypangolin_HDR "python/pypangolin/*.hpp" )
list(APPEND HEADERS
@@ -382,6 +384,7 @@ endif()
option(BUILD_PANGOLIN_FFMPEG "Build support for ffmpeg video input" ON)
if(BUILD_PANGOLIN_FFMPEG AND BUILD_PANGOLIN_VIDEO)
+ add_definitions(-DHAVE_FFMPEG_AVPIXELFORMAT)
find_package(FFMPEG QUIET)
if(FFMPEG_FOUND)
set(HAVE_FFMPEG 1)
@@ -464,11 +467,14 @@ endif()
option(BUILD_PANGOLIN_LIBUVC "Build support for libuvc video input" ON)
if(BUILD_PANGOLIN_LIBUVC AND BUILD_PANGOLIN_VIDEO)
- find_package(uvc QUIET)
- if(uvc_FOUND)
+ find_package(libuvc CONFIG QUIET)
+ if(libuvc_FOUND)
set(HAVE_UVC 1)
- list(APPEND INTERNAL_INC ${uvc_INCLUDE_DIRS} )
- list(APPEND LINK_LIBS ${uvc_LIBRARIES} )
+ if (TARGET LibUVC::UVCShared)
+ list(APPEND LINK_LIBS LibUVC::UVCShared )
+ else()
+ list(APPEND LINK_LIBS LibUVC::UVCStatic )
+ endif()
list(APPEND HEADERS ${INCDIR}/video/drivers/uvc.h )
list(APPEND SOURCES video/drivers/uvc.cpp)
list(APPEND VIDEO_FACTORY_REG RegisterUvcVideoFactory )
@@ -584,11 +590,10 @@ endif()
option(BUILD_PANGOLIN_LIBOPENEXR "Build support for libopenexr image input" ON)
if(BUILD_PANGOLIN_LIBOPENEXR)
- find_package(OpenEXR QUIET)
+ find_package(OpenEXR CONFIG QUIET)
if(OpenEXR_FOUND)
set(HAVE_OPENEXR 1)
- list(APPEND INTERNAL_INC ${OpenEXR_INCLUDE_DIR} )
- list(APPEND LINK_LIBS ${OpenEXR_LIBRARY} )
+ list(APPEND LINK_LIBS OpenEXR::IlmImf OpenEXR::IlmImfUtil OpenEXR::IlmImfConfig )
message(STATUS "libopenexr Found and Enabled")
endif()
endif()
@@ -630,6 +635,13 @@ endif()
set(INSTALL_INCLUDE_DIR "include")
+# Required by geometry
+if(NOT BUILD_EXTERN_GLEW)
+ find_package(GLEW REQUIRED)
+endif()
+list(APPEND USER_INC ${GLEW_INCLUDE_DIR})
+list(APPEND LINK_LIBS ${GLEW_LIBRARY})
+
add_library(${LIBRARY_NAME} ${SOURCES} ${HEADERS})
# 'System' includes shield us from warnings in those includes.
target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC ${USER_INC} PRIVATE ${INTERNAL_INC})
@@ -692,7 +704,13 @@ CreateMethodCallFile(
option(BUILD_PYPANGOLIN_MODULE "Python wrapper for Pangolin" ON)
if(BUILD_PYPANGOLIN_MODULE AND HAVE_PYTHON )
file(GLOB pypangolin_SRC "python/pypangolin/*.hpp" "python/pypangolin/*.cpp" "python/pypangolin_module.cpp")
- pybind11_add_module(pypangolin ${pypangolin_SRC})
+ if (BUILD_SHARED_LIBS)
+ set(PYBIND11_MODULE_TYPE SHARED)
+ else()
+ set(PYBIND11_MODULE_TYPE STATIC)
+ endif()
+
+ pybind11_add_module(pypangolin ${PYBIND11_MODULE_TYPE} ${pypangolin_SRC})
target_link_libraries(pypangolin PRIVATE ${LIBRARY_NAME})
target_include_directories(pypangolin PRIVATE "${USER_INC}")
endif()

View File

@@ -0,0 +1,13 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a2c60ea..ddeb144 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -735,7 +735,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY IMMEDIATE )
# Install tree config
-set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
+set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/../../include" )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY )

95
externals/vcpkg/ports/pangolin/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,95 @@
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stevenlovegrove/Pangolin
REF dd801d244db3a8e27b7fe8020cd751404aa818fd #v0.6
SHA512 8004ab6f146f319df41e4b8d4bdb6677b8faf6db725e34fea76fcbf065522fa286d334c2426dcb39faf0cfb3332946104f78393d2b2b2418fe02d91450916e78
HEAD_REF master
PATCHES
fix-includepath-error.patch # include path has one more ../
fix-cmake-version.patch
fix-build-error-in-vs2019.patch
fix-dependencies.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test BUILD_TESTS
tools BUILD_TOOLS
examples BUILD_EXAMPLES
gui BUILD_PANGOLIN_GUI
vars BUILD_PANGOLIN_VARS
video BUILD_PANGOLIN_VIDEO
pybind11 BUILD_PANGOLIN_PYTHON
eigen BUILD_PANGOLIN_EIGEN
ffmpeg BUILD_PANGOLIN_FFMPEG
realsense BUILD_PANGOLIN_LIBREALSENSE2
openni2 BUILD_PANGOLIN_OPENNI2
uvc BUILD_PANGOLIN_LIBUVC
png BUILD_PANGOLIN_LIBPNG
jpeg BUILD_PANGOLIN_LIBJPEG
tiff BUILD_PANGOLIN_LIBTIFF
openexr BUILD_PANGOLIN_LIBOPENEXR
zstd BUILD_PANGOLIN_ZSTD
lz4 BUILD_PANGOLIN_LZ4
module BUILD_PYPANGOLIN_MODULE
)
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake")
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake")
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS ${FEATURE_OPTIONS}
-DBUILD_EXTERN_GLEW=OFF
-DBUILD_EXTERN_LIBPNG=OFF
-DBUILD_EXTERN_LIBJPEG=OFF
-DBUILD_PANGOLIN_PLEORA=OFF
-DBUILD_PANGOLIN_TELICAM=OFF
-DBUILD_PANGOLIN_DEPTHSENSE=OFF
-DBUILD_PANGOLIN_OPENNI=OFF
-DBUILD_PANGOLIN_UVC_MEDIAFOUNDATION=OFF
-DBUILD_PANGOLIN_LIBREALSENSE=OFF
-DBUILD_PANGOLIN_V4L=OFF
-DBUILD_PANGOLIN_LIBDC1394=OFF
-DBUILD_PANGOLIN_TOON=OFF
-DDISPLAY_WAYLAND=OFF
-DDISPLAY_X11=OFF
-DBUILD_FOR_GLES_2=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT}
MAYBE_UNUSED_VARIABLES
MSVC_USE_STATIC_CRT
BUILD_FOR_GLES_2
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Pangolin)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinConfig.cmake" "SET( Pangolin_CMAKEMODULES ${SOURCE_PATH}/src/../CMakeModules )" "")
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES Plotter VideoConvert VideoJsonPrint VideoJsonTransform VideoViewer AUTO_CLEAN)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
if(VCPKG_TARGET_IS_WINDOWS)
# Copy missing header file
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/pangolin")
endif()
# Put the license file where vcpkg expects it
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENCE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

5
externals/vcpkg/ports/pangolin/usage vendored Executable file
View File

@@ -0,0 +1,5 @@
The package pangolin is compatible with built-in CMake targets:
find_package(Pangolin CONFIG REQUIRED)
target_link_libraries(main PRIVATE pangolin)
target_include_directories(main PRIVATE ${Pangolin_INCLUDE_DIRS})

131
externals/vcpkg/ports/pangolin/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,131 @@
{
"name": "pangolin",
"version": "0.6",
"port-version": 2,
"description": "Lightweight GUI Library",
"homepage": "https://github.com/stevenlovegrove/Pangolin",
"supports": "!uwp",
"dependencies": [
"glew",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"eigen",
"ffmpeg",
"gui",
"jpeg",
"png",
"vars",
"video"
],
"features": {
"eigen": {
"description": "Build support for Eigen matrix types",
"dependencies": [
"eigen3"
]
},
"examples": {
"description": "Build Examples"
},
"ffmpeg": {
"description": "Build support for ffmpeg video input",
"dependencies": [
{
"name": "ffmpeg",
"features": [
"avformat"
]
}
]
},
"gui": {
"description": "Build support for Pangolin GUI"
},
"jpeg": {
"description": "Build support for libjpeg image input",
"dependencies": [
"libjpeg-turbo"
]
},
"lz4": {
"description": "Build support for liblz4 compression",
"dependencies": [
"lz4"
]
},
"module": {
"description": "Python wrapper for Pangolin",
"dependencies": [
"python3"
]
},
"openexr": {
"description": "Build support for libopenexr image input",
"dependencies": [
"openexr"
]
},
"openni2": {
"description": "Build support for OpenNI2 video input",
"dependencies": [
"openni2"
]
},
"png": {
"description": "Build support for libpng image input",
"dependencies": [
"libpng"
]
},
"pybind11": {
"description": "Build support for Pangolin Interactive Console",
"dependencies": [
"pybind11"
]
},
"realsense": {
"description": "Build support for LibRealSense2 video input",
"dependencies": [
"realsense2"
]
},
"test": {
"description": "Build Tests"
},
"tiff": {
"description": "Build support for libtiff image input",
"dependencies": [
"tiff"
]
},
"tools": {
"description": "Build Tools"
},
"uvc": {
"description": "Build support for MediaFoundation UVC input",
"dependencies": [
"libuvc"
]
},
"vars": {
"description": "Build support for Pangolin Vars"
},
"video": {
"description": "Build support for Pangolin Video Utilities"
},
"zstd": {
"description": "Build support for libzstd compression",
"dependencies": [
"zstd"
]
}
}
}