Skip to content
Merged
Show file tree
Hide file tree
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
Sep 6, 2021
141bf89
Fix dependency name realsense2
Sep 6, 2021
a1e66b0
Remove default-feature gles
Sep 6, 2021
71f1524
Re-generated patch, add MAYBE_UNUSED_VARIABLES, fix build with core
Sep 6, 2021
4d5cfea
version
Sep 6, 2021
b16cd9d
Fix desc, add more MAYBE_UNUSED_VARIABLES
Sep 6, 2021
e9b6ede
version
Sep 6, 2021
b797cdb
more MAYBE_UNUSED_VARIABLES
Sep 6, 2021
a8ea05f
version
Sep 6, 2021
a4eccd0
Remove some CMAKE_DISABLE_FIND_PACKAGE_*
Sep 6, 2021
9ae0a1e
version
Sep 6, 2021
7c447c0
Remove more CMAKE_DISABLE_FIND_* since they are disabled
Sep 6, 2021
d74bd68
Remove BUILD_FOR_GLES_2
Sep 6, 2021
6423938
version
Sep 6, 2021
178bd12
Restore BUILD_FOR_GLES_2
Sep 6, 2021
049e43a
version
Sep 6, 2021
4feb739
Fix more dependencies
Sep 6, 2021
6f8cde6
[libuvc]Fix build type, fix usage
Sep 6, 2021
04c47a2
version
Sep 6, 2021
e3d3332
Re-make patch
Sep 6, 2021
e037fd3
version
Sep 6, 2021
797d92a
Use libjpeg macros instead of target name to avoid use `find_dependency`
Sep 6, 2021
a143627
version
Sep 6, 2021
9022acc
Fix usage on non-Windows
Sep 7, 2021
a6b4720
version
Sep 7, 2021
2e4f459
commit suggestions
Sep 7, 2021
f85c387
version
Sep 7, 2021
b1662e7
Apply suggestion
Sep 8, 2021
fee2692
version
Sep 8, 2021
41b3bf8
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Sep 8, 2021
64b8900
Re-fix JPEG
Sep 9, 2021
8aa7e25
version
Sep 9, 2021
15a1b0d
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 9, 2021
2f301b7
typo
Sep 9, 2021
31c70e3
format
Sep 9, 2021
35c3116
version
Sep 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/libusb/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ else()
endif()

configure_file(${CURRENT_PORT_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
configure_file(${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
4 changes: 4 additions & 0 deletions ports/libusb/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ select_library_configurations(LIBUSB)

set(LIBUSB_INCLUDE_DIRS ${LIBUSB_INCLUDE_DIR})
set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY})

if (@VCPKG_TARGET_IS_LINUX@)
list(APPEND LIBUSB_LIBRARIES udev)
endif()
2 changes: 1 addition & 1 deletion ports/libusb/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libusb",
"version": "1.0.24",
"port-version": 4,
"port-version": 5,
"description": "a cross-platform library to access USB devices",
"homepage": "https://github.com/libusb/libusb",
"supports": "!uwp"
Expand Down
25 changes: 22 additions & 3 deletions ports/libuvc/build_fix.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3c8116..0da84a7 100644
index f3c8116..b9a6d38 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ set(SOURCES
@@ -39,10 +39,10 @@ set(SOURCES
src/misc.c
)

-find_package(LibUSB)
+find_package(libusb CONFIG REQUIRED)

# JpegPkg name to differ from shipped with CMake
find_package(JpegPkg QUIET)
-find_package(JpegPkg QUIET)
+find_package(JPEG REQUIRED)
if(JPEG_FOUND)
message(STATUS "Building libuvc with JPEG support.")
set(LIBUVC_HAS_JPEG TRUE)
@@ -107,9 +107,10 @@ foreach(target_name IN LISTS UVC_TARGETS)
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
Expand All @@ -23,3 +27,18 @@ index f3c8116..0da84a7 100644
)
if(JPEG_FOUND)
target_link_libraries(${target_name}
diff --git a/libuvcConfig.cmake b/libuvcConfig.cmake
index b9887ea..e8f09dc 100644
--- a/libuvcConfig.cmake
+++ b/libuvcConfig.cmake
@@ -10,8 +10,8 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
list(APPEND extraArgs REQUIRED)
endif()

-find_package(JpegPkg ${extraArgs})
-find_package(LibUSB ${extraArgs})
+include(CMakeFindDependencyMacro)
+find_dependency(JPEG ${extraArgs})
include("${CMAKE_CURRENT_LIST_DIR}/libuvcTargets.cmake")

set(libuvc_FOUND TRUE)
29 changes: 17 additions & 12 deletions ports/libuvc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@ vcpkg_from_github(
REF c612d4509eb0ff19ce414abc3dca18d0f6263a84
SHA512 df3f23463728e8ffd69dc52e251ea2610ea8df32b02f6d26dd2a6910cf217650245bb1a11e67be61df875c6992d592c9cb17675d914997bd72c9fe7eb5b65c32
HEAD_REF master
PATCHES
build_fix.patch
PATCHES build_fix.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DBUILD_EXAMPLE=OFF
)
vcpkg_install_cmake()
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(BUILD_TARGET "Shared")
else()
set(BUILD_TARGET "Static")
endif()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libuvc)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DCMAKE_BUILD_TARGET=${BUILD_TARGET}
-DBUILD_EXAMPLE=OFF
)
vcpkg_cmake_install()

vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
vcpkg_cmake_config_fixup(PACKAGE_NAME libuvc CONFIG_PATH lib/cmake/libuvc)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
16 changes: 13 additions & 3 deletions ports/libuvc/vcpkg.json
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
}
]
}
12 changes: 0 additions & 12 deletions ports/pangolin/add-definition.patch

This file was deleted.

97 changes: 97 additions & 0 deletions ports/pangolin/fix-dependencies.patch
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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()
15 changes: 0 additions & 15 deletions ports/pangolin/fix-dependency-python.patch

This file was deleted.

49 changes: 33 additions & 16 deletions ports/pangolin/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-includepath-error.patch # include path has one more ../
fix-dependency-python.patch
add-definition.patch
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
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")
Expand All @@ -36,20 +51,22 @@ vcpkg_cmake_configure(
-DBUILD_EXTERN_GLEW=OFF
-DBUILD_EXTERN_LIBPNG=OFF
-DBUILD_EXTERN_LIBJPEG=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_TooN=ON
-DCMAKE_DISABLE_FIND_PACKAGE_DC1394=ON
-DCMAKE_DISABLE_FIND_PACKAGE_LibRealSense=ON
-DCMAKE_DISABLE_FIND_PACKAGE_OpenNI=ON
-DCMAKE_DISABLE_FIND_PACKAGE_OpenNI2=ON
-DCMAKE_DISABLE_FIND_PACKAGE_uvc=ON
-DCMAKE_DISABLE_FIND_PACKAGE_DepthSense=ON
-DCMAKE_DISABLE_FIND_PACKAGE_TeliCam=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Pleora=ON
-DCMAKE_DISABLE_FIND_PACKAGE_TIFF=ON
-DCMAKE_DISABLE_FIND_PACKAGE_OpenEXR=ON
-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()
Expand Down
Loading