2020-10-21 01:59:20 +08:00
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2017-08-21 02:03:45 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO stevenlovegrove/Pangolin
|
2022-12-31 17:33:19 +08:00
|
|
|
REF v0.8
|
|
|
|
SHA512 d4ca405097e8c439a4f74495f374bc5d5e4febafcf59ee88d985a8764ed36da1753ca4a3a73476dfb74c7d92df31a99242df6e1b47c648e860eee835a6f4f434
|
2017-08-21 02:03:45 +08:00
|
|
|
HEAD_REF master
|
2023-01-05 04:04:44 +08:00
|
|
|
PATCHES
|
|
|
|
devendor-palsigslot.patch
|
2023-01-27 11:59:17 +08:00
|
|
|
ffmpeg-vxmc.patch
|
2021-09-03 09:01:14 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2021-09-11 04:41:46 +08:00
|
|
|
test BUILD_TESTS
|
|
|
|
tools BUILD_TOOLS
|
|
|
|
examples BUILD_EXAMPLES
|
|
|
|
pybind11 BUILD_PANGOLIN_PYTHON
|
|
|
|
ffmpeg BUILD_PANGOLIN_FFMPEG
|
2022-12-31 17:33:19 +08:00
|
|
|
realsense BUILD_PANGOLIN_REALSENSE2
|
2021-09-11 04:41:46 +08:00
|
|
|
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
|
2017-08-21 02:03:45 +08:00
|
|
|
)
|
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindGLEW.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/CMakeModules/FindFFMPEG.cmake")
|
2023-01-05 04:04:44 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/components/pango_core/include/sigslot")
|
2017-10-26 09:31:00 +08:00
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT)
|
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2021-09-11 04:41:46 +08:00
|
|
|
-DBUILD_PANGOLIN_PLEORA=OFF
|
|
|
|
-DBUILD_PANGOLIN_TELICAM=OFF
|
|
|
|
-DBUILD_PANGOLIN_DEPTHSENSE=OFF
|
|
|
|
-DBUILD_PANGOLIN_OPENNI=OFF
|
|
|
|
-DBUILD_PANGOLIN_UVC_MEDIAFOUNDATION=OFF
|
2022-12-31 17:33:19 +08:00
|
|
|
-DBUILD_PANGOLIN_REALSENSE=OFF
|
2021-09-11 04:41:46 +08:00
|
|
|
-DBUILD_PANGOLIN_V4L=OFF
|
|
|
|
-DBUILD_PANGOLIN_LIBDC1394=OFF
|
|
|
|
-DBUILD_FOR_GLES_2=OFF
|
2022-12-31 17:33:19 +08:00
|
|
|
-DBUILD_PANGOLIN_LIBRAW=OFF
|
2017-10-26 09:31:00 +08:00
|
|
|
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT}
|
2021-09-03 09:01:14 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
MSVC_USE_STATIC_CRT
|
2021-09-11 04:41:46 +08:00
|
|
|
BUILD_FOR_GLES_2
|
2017-08-21 02:03:45 +08:00
|
|
|
)
|
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-08-21 02:03:45 +08:00
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Pangolin)
|
2023-01-05 04:04:44 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinConfig.cmake" "Pangolin_CMAKEMODULES ${SOURCE_PATH}/" "Pangolin_CMAKEMODULES \${CMAKE_CURRENT_LIST_DIR}/")
|
2017-08-21 02:03:45 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-09-25 20:48:34 +08:00
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES Plotter VideoConvert VideoJsonPrint VideoJsonTransform VideoViewer AUTO_CLEAN)
|
|
|
|
endif()
|
2017-09-25 20:48:34 +08:00
|
|
|
|
2021-09-03 09:01:14 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2020-09-30 05:23:04 +08:00
|
|
|
endif()
|
|
|
|
|
2017-08-21 02:03:45 +08:00
|
|
|
# Put the license file where vcpkg expects it
|
2021-09-03 09:01:14 +08:00
|
|
|
file(COPY "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2022-12-31 17:33:19 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
|