diff options
Diffstat (limited to 'vcpkg/ports/pangolin')
| -rw-r--r-- | vcpkg/ports/pangolin/devendor-palsigslot.patch | 26 | ||||
| -rw-r--r-- | vcpkg/ports/pangolin/portfile.cmake | 76 | ||||
| -rw-r--r-- | vcpkg/ports/pangolin/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/pangolin/vcpkg.json | 131 |
4 files changed, 237 insertions, 0 deletions
diff --git a/vcpkg/ports/pangolin/devendor-palsigslot.patch b/vcpkg/ports/pangolin/devendor-palsigslot.patch new file mode 100644 index 0000000..4a858e0 --- /dev/null +++ b/vcpkg/ports/pangolin/devendor-palsigslot.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/PangolinConfig.cmake.in b/cmake/PangolinConfig.cmake.in +index 3ceea9d..e5bf9f0 100644 +--- a/cmake/PangolinConfig.cmake.in ++++ b/cmake/PangolinConfig.cmake.in +@@ -12,6 +12,7 @@ SET( Pangolin_LIBRARY "${Pangolin_LIBRARIES}" ) + + include(CMakeFindDependencyMacro) + find_dependency(Eigen3) ++find_dependency(PalSigslot CONFIG) + + if (UNIX) + find_dependency(Threads) +diff --git a/components/pango_core/CMakeLists.txt b/components/pango_core/CMakeLists.txt +index e1d931b..6c6ad4d 100644 +--- a/components/pango_core/CMakeLists.txt ++++ b/components/pango_core/CMakeLists.txt +@@ -49,6 +49,9 @@ install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/include" + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) + ++find_package(PalSigslot CONFIG REQUIRED) ++target_link_libraries(${COMPONENT} PUBLIC Pal::Sigslot) ++ + find_package(Threads QUIET) + if(Threads_FOUND) + target_link_libraries(${COMPONENT} PUBLIC Threads::Threads) diff --git a/vcpkg/ports/pangolin/portfile.cmake b/vcpkg/ports/pangolin/portfile.cmake new file mode 100644 index 0000000..84a95bb --- /dev/null +++ b/vcpkg/ports/pangolin/portfile.cmake @@ -0,0 +1,76 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevenlovegrove/Pangolin + REF "v${VERSION}" + SHA512 d303f0d9f02492e4fe0eb844db4fda563404ba73d1350a5b3ed45745c40022726b27cbd92cd1d0990186d1438ba0d2710fc614028b725f054486741ae30fd490 + HEAD_REF master + PATCHES + devendor-palsigslot.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools BUILD_TOOLS + examples BUILD_EXAMPLES + pybind11 BUILD_PANGOLIN_PYTHON + ffmpeg BUILD_PANGOLIN_FFMPEG + realsense BUILD_PANGOLIN_REALSENSE2 + 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 +) + +file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake") +file(REMOVE "${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/components/pango_core/include/sigslot") + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_PANGOLIN_PLEORA=OFF + -DBUILD_PANGOLIN_TELICAM=OFF + -DBUILD_PANGOLIN_DEPTHSENSE=OFF + -DBUILD_PANGOLIN_OPENNI=OFF + -DBUILD_PANGOLIN_UVC_MEDIAFOUNDATION=OFF + -DBUILD_PANGOLIN_REALSENSE=OFF + -DBUILD_PANGOLIN_V4L=OFF + -DBUILD_PANGOLIN_LIBDC1394=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 + 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" "Pangolin_CMAKEMODULES ${SOURCE_PATH}/" "Pangolin_CMAKEMODULES \${CMAKE_CURRENT_LIST_DIR}/") + +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() + +# Put the license file where vcpkg expects it +file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
\ No newline at end of file diff --git a/vcpkg/ports/pangolin/usage b/vcpkg/ports/pangolin/usage new file mode 100644 index 0000000..90fe107 --- /dev/null +++ b/vcpkg/ports/pangolin/usage @@ -0,0 +1,4 @@ +pangolin provides CMake targets:
+
+ find_package(Pangolin CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE ${Pangolin_LIBRARIES})
diff --git a/vcpkg/ports/pangolin/vcpkg.json b/vcpkg/ports/pangolin/vcpkg.json new file mode 100644 index 0000000..a86bf43 --- /dev/null +++ b/vcpkg/ports/pangolin/vcpkg.json @@ -0,0 +1,131 @@ +{ + "name": "pangolin", + "version": "0.9.4", + "description": "Lightweight GUI Library", + "homepage": "https://github.com/stevenlovegrove/Pangolin", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + "eigen3", + "glew", + "libepoxy", + "palsigslot", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "ffmpeg", + "jpeg", + "png" + ], + "features": { + "eigen": { + "description": "Unused option left for backwards compatibility with older versions" + }, + "examples": { + "description": "Build Examples" + }, + "ffmpeg": { + "description": "Build support for ffmpeg video input", + "dependencies": [ + { + "name": "ffmpeg", + "features": [ + "avformat" + ] + } + ] + }, + "gui": { + "description": "Unused option left for backwards compatibility with older versions" + }, + "jpeg": { + "description": "Build support for libjpeg image input", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "lz4": { + "description": "Build support for liblz4 compression", + "dependencies": [ + "lz4" + ] + }, + "module": { + "description": "Unused option left for backwards compatibility with older versions" + }, + "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": "Python wrapper for Pangolin", + "dependencies": [ + "pybind11", + "python3" + ] + }, + "realsense": { + "description": "Build support for LibRealSense2 video input", + "dependencies": [ + "realsense2" + ] + }, + "tiff": { + "description": "Build support for libtiff image input", + "dependencies": [ + { + "name": "tiff", + "default-features": false + } + ] + }, + "tools": { + "description": "Build Tools", + "dependencies": [ + { + "name": "pangolin", + "default-features": false + } + ] + }, + "uvc": { + "description": "Build support for MediaFoundation UVC input", + "dependencies": [ + "libuvc" + ] + }, + "vars": { + "description": "Unused option left for backwards compatibility with older versions" + }, + "video": { + "description": "Unused option left for backwards compatibility with older versions" + }, + "zstd": { + "description": "Build support for libzstd compression", + "dependencies": [ + "zstd" + ] + } + } +} |