2017-11-07 15:59:02 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO IntelRealSense/librealsense
|
2017-12-24 22:46:16 +08:00
|
|
|
REF v2.8.3
|
|
|
|
SHA512 9be27109da0247cf6669f01b3f0f945073f7851897da553915716d979c50f6228e771ca5a63955707f618d0db1fc58ba52f78dece6d904b6671dee56ba70d48f
|
2017-11-07 15:59:02 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch
|
|
|
|
)
|
|
|
|
|
2017-11-08 14:37:16 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
2017-11-07 15:59:02 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2017-12-24 22:46:16 +08:00
|
|
|
-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
|
2017-11-07 15:59:02 +08:00
|
|
|
-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
|
2017-11-08 14:37:16 +08:00
|
|
|
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)
|
2017-11-07 15:59:02 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|