Skip to content

Commit

Permalink
Remove broken support for external metslib.
Browse files Browse the repository at this point in the history
  • Loading branch information
larshg committed Feb 11, 2024
1 parent 1033d24 commit ac77b3d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 34 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,6 @@ PCL_ADD_GRABBER_DEPENDENCY("DSSDK" "DepthSense SDK support")
PCL_ADD_GRABBER_DEPENDENCY("RSSDK" "RealSense SDK support")
PCL_ADD_GRABBER_DEPENDENCY("RSSDK2" "RealSense SDK 2.0 (librealsense) support")

# metslib
if(PKG_CONFIG_FOUND)
pkg_check_modules(METSLIB metslib)
if(METSLIB_FOUND)
set(HAVE_METSLIB ON)
endif()
endif()

# LibPNG
option(WITH_PNG "PNG file support" TRUE)
if(WITH_PNG)
Expand Down
37 changes: 13 additions & 24 deletions recognition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,32 +141,24 @@ set(srcs
src/implicit_shape_model.cpp
)

if(HAVE_METSLIB)
set(metslib_incs "")
else()
set(metslib_incs
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/abstract-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/local-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/mets.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/metslib_config.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/model.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/observer.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/simulated-annealing.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/tabu-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/termination-criteria.hh"
)
endif()
set(metslib_incs
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/abstract-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/local-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/mets.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/metslib_config.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/model.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/observer.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/simulated-annealing.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/tabu-search.hh"
"include/pcl/${SUBSYS_NAME}/3rdparty/metslib/termination-criteria.hh"
)

set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs} ${face_detection_incs} ${ransac_based_incs} ${ransac_based_impl_incs} ${hv_incs} ${hv_impl_incs} ${cg_incs} ${cg_impl_incs} ${metslib_incs})
target_link_libraries("${LIB_NAME}" pcl_common pcl_kdtree pcl_octree pcl_search pcl_features pcl_registration pcl_sample_consensus pcl_filters pcl_ml pcl_io)

if(HAVE_METSLIB)
target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${METSLIB_INCLUDE_DIRS})
else()
target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${PCL_SOURCE_DIR}/recognition/include/pcl/recognition/3rdparty/)
endif()
target_include_directories(${LIB_NAME} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/pcl/recognition/3rdparty/)

PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
# Install include files
Expand All @@ -182,7 +174,4 @@ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl/hv" ${hv_impl_incs})
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl/cg" ${cg_impl_incs})
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/linemod" ${LINEMOD_INCLUDES})
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl/linemod" ${LINEMOD_IMPLS})

if(NOT HAVE_METSLIB)
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/3rdparty/metslib" ${metslib_incs})
endif()
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/3rdparty/metslib" ${metslib_incs})
3 changes: 1 addition & 2 deletions recognition/include/pcl/recognition/hv/hv_go.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

#include <pcl/pcl_macros.h>
#include <pcl/recognition/hv/hypotheses_verification.h>
#include <pcl/recognition/3rdparty/metslib/mets.hh>
#include <pcl/features/normal_3d.h>

#include <metslib/mets.hh> // Either include 3.party in pcl/recognition/3rdparty or system installed metslib

#include <memory>

namespace pcl
Expand Down

0 comments on commit ac77b3d

Please sign in to comment.