Skip to content

Commit

Permalink
[rtabmap] Fixup [skip actions]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Mar 28, 2024
1 parent 874e596 commit dce2738
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
37 changes: 4 additions & 33 deletions ports/rtabmap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vcpkg_from_github(
rtabmap-res-tool.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS OPTIONS
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
gui WITH_QT
k4w2 WITH_K4W2
Expand All @@ -23,16 +23,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS OPTIONS
tools BUILD_TOOLS
)

if(VCPKG_CROSSCOMPILING)
vcpkg_list(APPEND OPTIONS "-DRTABMAP_RES_TOOL=${CURRENT_HOST_INSTALLED_DIR}/tools/rtabmap-res-tool/rtabmap-res_tool${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_AS_BUNDLE=OFF
-DBUILD_EXAMPLES=OFF
-DRTABMAP_QT_VERSION=6
"-DRTABMAP_RES_TOOL=${CURRENT_HOST_INSTALLED_DIR}/tools/rtabmap-res-tool/rtabmap-res_tool${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
-DWITH_ALICE_VISION=OFF
-DWITH_CCCORELIB=OFF
-DWITH_CERES=ON
Expand Down Expand Up @@ -69,7 +67,7 @@ vcpkg_cmake_configure(
-DWITH_VISO2=OFF
-DWITH_ZED=OFF
-DWITH_ZEDOC=OFF
${OPTIONS}
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DBUILD_APP=OFF
-DBUILD_TOOLS=OFF
Expand All @@ -86,13 +84,6 @@ endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(NOT VCPKG_CROSSCOMPILING)
if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES rtabmap-res_tool-0.3.0)
endif()
vcpkg_copy_tools(TOOL_NAMES rtabmap-res_tool AUTO_CLEAN)
endif()

if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES
Expand Down Expand Up @@ -123,28 +114,8 @@ if("tools" IN_LIST FEATURES)
rtabmap-rgbd_camera
AUTO_CLEAN
)

#[[
# Remove duplicate files that were added by qtdeploy
# that would be already deployed by vcpkg_copy_tools
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
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" "./../../../" "./../../")

if(NOT VCPKG_BUILD_TYPE)
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()
endif()

Expand Down
15 changes: 8 additions & 7 deletions ports/rtabmap/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
},
{
"name": "pcl",
"default-features": false,
"features": [
"vtk"
]
"default-features": false
},
{
"name": "rtabmap-res-tool",
"host": true,
"platform": "!native"
"host": true
},
"sqlite3",
{
Expand All @@ -48,7 +44,8 @@
"name": "pcl",
"default-features": false,
"features": [
"qt"
"qt",
"visualization"
]
},
{
Expand All @@ -59,6 +56,10 @@
"opengl",
"widgets"
]
},
{
"name": "vtk",
"default-features": false
}
]
},
Expand Down

0 comments on commit dce2738

Please sign in to comment.