mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-08 13:25:26 +08:00
366bbc0190
Update realsense2 port to librealsense v2.9.1.
44 lines
1.3 KiB
CMake
44 lines
1.3 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO IntelRealSense/librealsense
|
|
REF v2.9.1
|
|
SHA512 065b772948ebe34d187d44110326f711f3184876b1f129de83552c5cfe333485f9b0c9e4774b391e55d7fe533619818594f0946eee07d528dfe91b2c5e96d942
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_apply_patches(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PATCHES
|
|
${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
-DENFORCE_METADATA=ON
|
|
-DBUILD_EXAMPLES=OFF
|
|
-DBUILD_GRAPHICAL_EXAMPLES=OFF
|
|
-DBUILD_PYTHON_BINDINGS=OFF
|
|
-DBUILD_UNIT_TESTS=OFF
|
|
-DBUILD_WITH_OPENMP=OFF # keep OpenMP off until librealsense issue #744 is patched
|
|
-DBUILD_SHARED_LIBS=${BUILD_SHARED}
|
|
OPTIONS_DEBUG
|
|
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
# Handle copyright
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|