mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 22:11:37 +08:00
[pangolin] Update to 0.8. (#28492)
* [pangolin] Update to version 0.8. * Update versions. * [pangolin] Remove the unused pathes. * Update pangolin.json * Update portfile.cmake * Update ports/pangolin/portfile.cmake Co-authored-by: Nick <quyykk@protonmail.com> * Update pangolin.json * Fix typo * Update pangolin.json * [pangolin] Fixx tools features. * Update pangolin.json * Create no-op features for backwards compatibility. Co-authored-by: Nick <quyykk@protonmail.com>
This commit is contained in:
parent
5e3e643da0
commit
c9aab3b6aa
@ -1,13 +0,0 @@
|
||||
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) || \
|
@ -1,10 +0,0 @@
|
||||
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)
|
@ -1,129 +0,0 @@
|
||||
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,14 @@ 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::OpenEXR)
|
||||
+ string(APPEND ExternConfig "
|
||||
+ include(CMakeFindDependencyMacro)
|
||||
+ find_dependency(OpenEXR CONFIG)
|
||||
+")
|
||||
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()
|
||||
diff --git a/src/image/image_io_exr.cpp b/src/image/image_io_exr.cpp
|
||||
index 52c0078..1bd6c55 100644
|
||||
--- a/src/image/image_io_exr.cpp
|
||||
+++ b/src/image/image_io_exr.cpp
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <pangolin/image/typed_image.h>
|
||||
|
||||
#ifdef HAVE_OPENEXR
|
||||
+#include <ImfFrameBuffer.h>
|
||||
+#include <ImfHeader.h>
|
||||
#include <ImfChannelList.h>
|
||||
#include <ImfInputFile.h>
|
||||
#include <ImfOutputFile.h>
|
||||
@@ -54,12 +56,12 @@ class StdIStream: public Imf::IStream
|
||||
return true;
|
||||
}
|
||||
|
||||
- virtual Imf::Int64 tellg ()
|
||||
+ virtual uint64_t tellg ()
|
||||
{
|
||||
return std::streamoff (_is->tellg());
|
||||
}
|
||||
|
||||
- virtual void seekg (Imf::Int64 pos)
|
||||
+ virtual void seekg (uint64_t pos)
|
||||
{
|
||||
_is->seekg (pos);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
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 )
|
||||
|
@ -6,14 +6,9 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO stevenlovegrove/Pangolin
|
||||
REF dd801d244db3a8e27b7fe8020cd751404aa818fd #v0.6
|
||||
SHA512 8004ab6f146f319df41e4b8d4bdb6677b8faf6db725e34fea76fcbf065522fa286d334c2426dcb39faf0cfb3332946104f78393d2b2b2418fe02d91450916e78
|
||||
REF v0.8
|
||||
SHA512 d4ca405097e8c439a4f74495f374bc5d5e4febafcf59ee88d985a8764ed36da1753ca4a3a73476dfb74c7d92df31a99242df6e1b47c648e860eee835a6f4f434
|
||||
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
|
||||
@ -21,13 +16,9 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
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
|
||||
realsense BUILD_PANGOLIN_REALSENSE2
|
||||
openni2 BUILD_PANGOLIN_OPENNI2
|
||||
uvc BUILD_PANGOLIN_LIBUVC
|
||||
png BUILD_PANGOLIN_LIBPNG
|
||||
@ -36,7 +27,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
openexr BUILD_PANGOLIN_LIBOPENEXR
|
||||
zstd BUILD_PANGOLIN_ZSTD
|
||||
lz4 BUILD_PANGOLIN_LZ4
|
||||
module BUILD_PYPANGOLIN_MODULE
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake")
|
||||
@ -47,21 +37,16 @@ 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_REALSENSE=OFF
|
||||
-DBUILD_PANGOLIN_V4L=OFF
|
||||
-DBUILD_PANGOLIN_LIBDC1394=OFF
|
||||
-DBUILD_PANGOLIN_TOON=OFF
|
||||
-DDISPLAY_WAYLAND=OFF
|
||||
-DDISPLAY_X11=OFF
|
||||
-DBUILD_FOR_GLES_2=OFF
|
||||
-DBUILD_PANGOLIN_LIBRAW=OFF
|
||||
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
MSVC_USE_STATIC_CRT
|
||||
@ -85,11 +70,6 @@ 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)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "pangolin",
|
||||
"version": "0.6",
|
||||
"port-version": 4,
|
||||
"version": "0.8",
|
||||
"description": "Lightweight GUI Library",
|
||||
"homepage": "https://github.com/stevenlovegrove/Pangolin",
|
||||
"license": "MIT",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"eigen3",
|
||||
"glew",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
@ -18,20 +18,13 @@
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"eigen",
|
||||
"ffmpeg",
|
||||
"gui",
|
||||
"jpeg",
|
||||
"png",
|
||||
"vars",
|
||||
"video"
|
||||
"png"
|
||||
],
|
||||
"features": {
|
||||
"eigen": {
|
||||
"description": "Build support for Eigen matrix types",
|
||||
"dependencies": [
|
||||
"eigen3"
|
||||
]
|
||||
"description": "Unused option left for backwards compatibility with older versions"
|
||||
},
|
||||
"examples": {
|
||||
"description": "Build Examples"
|
||||
@ -48,7 +41,7 @@
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
"description": "Build support for Pangolin GUI"
|
||||
"description": "Unused option left for backwards compatibility with older versions"
|
||||
},
|
||||
"jpeg": {
|
||||
"description": "Build support for libjpeg image input",
|
||||
@ -63,10 +56,7 @@
|
||||
]
|
||||
},
|
||||
"module": {
|
||||
"description": "Python wrapper for Pangolin",
|
||||
"dependencies": [
|
||||
"python3"
|
||||
]
|
||||
"description": "Unused option left for backwards compatibility with older versions"
|
||||
},
|
||||
"openexr": {
|
||||
"description": "Build support for libopenexr image input",
|
||||
@ -87,9 +77,10 @@
|
||||
]
|
||||
},
|
||||
"pybind11": {
|
||||
"description": "Build support for Pangolin Interactive Console",
|
||||
"description": "Python wrapper for Pangolin",
|
||||
"dependencies": [
|
||||
"pybind11"
|
||||
"pybind11",
|
||||
"python3"
|
||||
]
|
||||
},
|
||||
"realsense": {
|
||||
@ -112,12 +103,7 @@
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "pangolin",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui",
|
||||
"vars",
|
||||
"video"
|
||||
]
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -128,10 +114,10 @@
|
||||
]
|
||||
},
|
||||
"vars": {
|
||||
"description": "Build support for Pangolin Vars"
|
||||
"description": "Unused option left for backwards compatibility with older versions"
|
||||
},
|
||||
"video": {
|
||||
"description": "Build support for Pangolin Video Utilities"
|
||||
"description": "Unused option left for backwards compatibility with older versions"
|
||||
},
|
||||
"zstd": {
|
||||
"description": "Build support for libzstd compression",
|
||||
|
@ -5717,8 +5717,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"pangolin": {
|
||||
"baseline": "0.6",
|
||||
"port-version": 4
|
||||
"baseline": "0.8",
|
||||
"port-version": 0
|
||||
},
|
||||
"pangomm": {
|
||||
"baseline": "2.50.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "94c1e44cce955d8e29658ed7f1db982a3a695cc3",
|
||||
"version": "0.8",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "d62a6b76d4bd5718163b90e1f54c154770df76fa",
|
||||
"version": "0.6",
|
||||
|
Loading…
Reference in New Issue
Block a user