vcpkg/ports/rtabmap/portfile.cmake

140 lines
4.2 KiB
CMake
Raw Normal View History

2020-11-04 14:51:43 +08:00
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO introlab/rtabmap
REF 0.21.4
SHA512 dedc1ed54560db4d61ca4595d5d90b963da8f3865e9caa58df5b6a1f74b7dfaa59f264c1b71a73f7e0bb3e7791d0cec67eeca8bd52416094f3c87c110b7b8549
2020-11-04 14:51:43 +08:00
HEAD_REF master
PATCHES
fix_link.patch
2020-11-04 14:51:43 +08:00
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
gui WITH_QT
octomap WITH_OCTOMAP
realsense2 WITH_REALSENSE2
k4w2 WITH_K4W2
openni2 WITH_OPENNI2
)
vcpkg_check_features(OUT_FEATURE_OPTIONS REL_FEATURE_OPTIONS
FEATURES
tools BUILD_TOOLS
tools BUILD_APP
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS_DEBUG
-DBUILD_TOOLS=OFF
-DBUILD_APP=OFF
OPTIONS_RELEASE
${REL_FEATURE_OPTIONS}
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_AS_BUNDLE=OFF
-DBUILD_EXAMPLES=OFF
-DWITH_ORB_OCTREE=ON
-DWITH_TORCH=OFF
-DWITH_PYTHON=OFF
-DWITH_PYTHON_THREADING=OFF
-DWITH_PDAL=OFF
-DWITH_FREENECT=OFF
-DWITH_FREENECT2=OFF
-DWITH_K4A=OFF
-DWITH_DC1394=OFF
-DWITH_G2O=ON
-DWITH_GTSAM=OFF
-DWITH_CERES=ON
-DWITH_VERTIGO=OFF
-DWITH_CVSBA=OFF
-DWITH_POINTMATCHER=OFF
-DWITH_CCCORELIB=OFF
-DWITH_LOAM=OFF
-DWITH_FLYCAPTURE2=OFF
-DWITH_ZED=OFF
-DWITH_ZEDOC=OFF
-DWITH_REALSENSE=OFF
-DWITH_REALSENSE_SLAM=OFF
-DWITH_MYNTEYE=OFF
-DWITH_DEPTHAI=OFF
-DWITH_CPUTSDF=OFF
-DWITH_OPENCHISEL=OFF
-DWITH_ALICE_VISION=OFF
-DWITH_FOVIS=OFF
-DWITH_VISO2=OFF
-DWITH_DVO=OFF
-DWITH_OKVIS=OFF
-DWITH_MSCKF_VIO=OFF
-DWITH_VINS=OFF
-DWITH_OPENVINS=OFF
-DWITH_MADGWICK=OFF
-DWITH_FASTCV=OFF
2020-11-04 14:51:43 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME RTABMap CONFIG_PATH CMake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2020-11-04 14:51:43 +08:00
vcpkg_copy_tools(TOOL_NAMES rtabmap-res_tool AUTO_CLEAN)
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(
2020-11-04 14:51:43 +08:00
TOOL_NAMES
rtabmap-camera
rtabmap-console
rtabmap-detectMoreLoopClosures
rtabmap-export
rtabmap-extractObject
rtabmap-info
rtabmap-kitti_dataset
rtabmap-recovery
rtabmap-report
rtabmap-reprocess
rtabmap-rgbd_dataset
rtabmap-euroc_dataset
rtabmap-cleanupLocalGrids
rtabmap-globalBundleAdjustment
2020-11-04 14:51:43 +08:00
AUTO_CLEAN
)
if("gui" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES
rtabmap
rtabmap-calibration
rtabmap-databaseViewer
rtabmap-dataRecorder
rtabmap-odometryViewer
rtabmap-rgbd_camera
AUTO_CLEAN
)
# Remove duplicate files that were added by qtdeploy
# that would be already deployed by vcpkg_copy_tools
2023-04-27 03:10:56 +08:00
file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tmp")
file(GLOB RTABMAP_REL_LIBS "${CURRENT_PACKAGES_DIR}/tmp/rtabmap*")
file(COPY ${RTABMAP_REL_LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tmp")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/translations")
#qt.conf
2023-04-27 03:10:56 +08:00
file(COPY "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/qt.conf" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf" "./../../../" "./../../")
2020-11-04 14:51:43 +08:00
# Debug
2023-04-27 03:10:56 +08:00
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/debug/tmp")
file(GLOB RTABMAP_DBG_LIBS "${CURRENT_PACKAGES_DIR}/debug/tmp/rtabmap*")
file(COPY ${RTABMAP_DBG_LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tmp")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/plugins")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/translations")
endif()
endif()
2020-11-04 14:51:43 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")