-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[vcpkg baseline][pangolin] Add features, fix dependency pybind11 #20006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e8bf766
[vcpkg baseline][pangolin] Add features, fix dependency pybind11
141bf89
Fix dependency name realsense2
a1e66b0
Remove default-feature gles
71f1524
Re-generated patch, add MAYBE_UNUSED_VARIABLES, fix build with core
4d5cfea
version
b16cd9d
Fix desc, add more MAYBE_UNUSED_VARIABLES
e9b6ede
version
b797cdb
more MAYBE_UNUSED_VARIABLES
a8ea05f
version
a4eccd0
Remove some CMAKE_DISABLE_FIND_PACKAGE_*
9ae0a1e
version
7c447c0
Remove more CMAKE_DISABLE_FIND_* since they are disabled
d74bd68
Remove BUILD_FOR_GLES_2
6423938
version
178bd12
Restore BUILD_FOR_GLES_2
049e43a
version
4feb739
Fix more dependencies
6f8cde6
[libuvc]Fix build type, fix usage
04c47a2
version
e3d3332
Re-make patch
e037fd3
version
797d92a
Use libjpeg macros instead of target name to avoid use `find_dependency`
a143627
version
9022acc
Fix usage on non-Windows
a6b4720
version
2e4f459
commit suggestions
f85c387
version
b1662e7
Apply suggestion
fee2692
version
41b3bf8
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal 64b8900
Re-fix JPEG
8aa7e25
version
15a1b0d
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
2f301b7
typo
31c70e3
format
35c3116
version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,21 @@ | ||
| { | ||
| "name": "libuvc", | ||
| "version-string": "2020-11-24", | ||
| "port-version": 1, | ||
| "version-date": "2020-11-24", | ||
| "port-version": 2, | ||
| "description": "a cross-platform library for USB video devices", | ||
| "homepage": "https://github.com/libuvc/libuvc", | ||
| "supports": "linux", | ||
| "dependencies": [ | ||
| "libusb" | ||
| "libjpeg-turbo", | ||
| "libusb", | ||
| "libusb", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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}) | ||
|
Comment on lines
+73
to
+80
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
| # '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() | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.