Skip to content

Commit

Permalink
Remove include_directories in pcl_targets.cmake and update accordingly.
Browse files Browse the repository at this point in the history
  • Loading branch information
larshg committed Oct 2, 2024
1 parent dcf9e3b commit 1db98c8
Show file tree
Hide file tree
Showing 24 changed files with 63 additions and 62 deletions.
1 change: 1 addition & 0 deletions 2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(impl_incs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME})
target_link_libraries(${LIB_NAME} INTERFACE pcl_filters)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} HEADER_ONLY)

#Install include files
Expand Down
2 changes: 1 addition & 1 deletion apps/3d_rec_framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ PCL_ADD_INCLUDES("${SUBSUBSYS_NAME}" "${SUBSYS_NAME}/${SUBSUBSYS_NAME}/pipeline/

set(LIB_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSUBSYS_NAME} SOURCES ${srcs} ${impl_incs_pipeline} ${incs_utils} ${incs_fw} ${incs_fw_global} ${incs_fw_local} ${incc_tools_framework} ${incs_pipelines} ${incs_pc_source})
target_link_libraries("${LIB_NAME}" pcl_apps pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search pcl_registration)
target_link_libraries("${LIB_NAME}" pcl_apps pcl_common pcl_io pcl_filters pcl_keypoints pcl_recognition pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search pcl_registration)

if(WITH_OPENNI)
target_link_libraries("${LIB_NAME}" ${OPENNI_LIBRARIES})
Expand Down
14 changes: 7 additions & 7 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PCL_ADD_EXECUTABLE(pcl_test_search_speed COMPONENT ${SUBSYS_NAME} SOURCES src/te
target_link_libraries(pcl_test_search_speed pcl_common pcl_io pcl_search pcl_kdtree pcl_visualization)

PCL_ADD_EXECUTABLE(pcl_nn_classification_example COMPONENT ${SUBSYS_NAME} SOURCES src/nn_classification_example.cpp)
target_link_libraries(pcl_nn_classification_example pcl_common pcl_io pcl_features pcl_kdtree)
target_link_libraries(pcl_nn_classification_example pcl_apps pcl_common pcl_io pcl_features pcl_kdtree)
target_include_directories(pcl_nn_classification_example PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

PCL_ADD_EXECUTABLE(pcl_pyramid_surface_matching COMPONENT ${SUBSYS_NAME} SOURCES src/pyramid_surface_matching.cpp)
Expand Down Expand Up @@ -124,7 +124,7 @@ if(VTK_FOUND)
src/pcd_video_player/pcd_video_player.ui
BUNDLE)

target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QTX}::Widgets)
target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_registration pcl_visualization pcl_segmentation pcl_features pcl_surface ${QTX}::Widgets)
target_include_directories(pcl_pcd_video_player PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
endif()

Expand Down Expand Up @@ -228,23 +228,23 @@ if(VTK_FOUND)
endif() # QHULL_FOUND

PCL_ADD_EXECUTABLE(pcl_ni_agast COMPONENT ${SUBSYS_NAME} SOURCES src/ni_agast.cpp BUNDLE)
target_link_libraries(pcl_ni_agast pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_keypoints pcl_surface pcl_search)
target_link_libraries(pcl_ni_agast pcl_apps pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_keypoints pcl_surface pcl_search)
target_include_directories(pcl_ni_agast PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

PCL_ADD_EXECUTABLE(pcl_ni_brisk COMPONENT ${SUBSYS_NAME} SOURCES src/ni_brisk.cpp BUNDLE)
target_link_libraries(pcl_ni_brisk pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_keypoints pcl_surface pcl_search)
target_link_libraries(pcl_ni_brisk pcl_apps pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_features pcl_keypoints pcl_surface pcl_search)
target_include_directories(pcl_ni_brisk PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

PCL_ADD_EXECUTABLE(pcl_ni_susan COMPONENT ${SUBSYS_NAME} SOURCES src/ni_susan.cpp BUNDLE)
target_link_libraries(pcl_ni_susan pcl_common pcl_visualization pcl_features pcl_keypoints pcl_search)
target_link_libraries(pcl_ni_susan pcl_apps pcl_common pcl_visualization pcl_features pcl_keypoints pcl_search)
target_include_directories(pcl_ni_susan PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

PCL_ADD_EXECUTABLE(pcl_ni_trajkovic COMPONENT ${SUBSYS_NAME} SOURCES src/ni_trajkovic.cpp BUNDLE)
target_link_libraries(pcl_ni_trajkovic pcl_common pcl_visualization pcl_features pcl_keypoints pcl_search)
target_link_libraries(pcl_ni_trajkovic pcl_apps pcl_common pcl_visualization pcl_features pcl_keypoints pcl_search)
target_include_directories(pcl_ni_trajkovic PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

PCL_ADD_EXECUTABLE(pcl_openni_klt COMPONENT ${SUBSYS_NAME} SOURCES src/openni_klt.cpp BUNDLE)
target_link_libraries(pcl_openni_klt pcl_common pcl_io pcl_visualization pcl_tracking)
target_link_libraries(pcl_openni_klt pcl_common pcl_io pcl_keypoints pcl_visualization pcl_tracking)
endif() # WITH_OPENNI
endif() # VTK_FOUND

Expand Down
4 changes: 2 additions & 2 deletions apps/cloud_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

set(SUBSUBSYS_NAME cloud_composer)
set(SUBSUBSYS_DESC "Cloud Composer - Application for Manipulating Point Clouds")
set(SUBSUBSYS_DEPS common io visualization filters apps)
set(SUBSUBSYS_DEPS common io visualization features filters apps)
set(SUBSUBSYS_EXT_DEPS vtk ${QTX})
set(REASON "")
set(DEFAULT OFF)
Expand Down Expand Up @@ -71,7 +71,7 @@ set(PCL_LIB_TYPE STATIC)
PCL_ADD_LIBRARY(pcl_cc_tool_interface COMPONENT ${SUBSUBSYS_NAME} SOURCES ${INTERFACE_HEADERS} ${INTERFACE_SOURCES})


target_link_libraries(pcl_cc_tool_interface pcl_common pcl_filters pcl_search pcl_visualization ${QTX}::Widgets)
target_link_libraries(pcl_cc_tool_interface pcl_common pcl_features pcl_filters pcl_search pcl_visualization ${QTX}::Widgets)

set(PCL_LIB_TYPE ${PCL_LIB_TYPE_ORIGIN})

Expand Down
2 changes: 1 addition & 1 deletion apps/in_hand_scanner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(SUBSUBSYS_NAME in_hand_scanner)
set(SUBSUBSYS_DESC "In-hand scanner for small objects")
set(SUBSUBSYS_DEPS common features io kdtree apps)
set(SUBSUBSYS_LIBS pcl_common pcl_features pcl_io pcl_kdtree)
set(SUBSUBSYS_LIBS pcl_common pcl_geometry pcl_features pcl_io pcl_kdtree)
set(SUBSUBSYS_EXT_DEPS ${QTX} OpenGL OpenGL_GLU openni)
set(REASON "")
set(DEFAULT OFF)
Expand Down
2 changes: 1 addition & 1 deletion apps/modeler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ PCL_ADD_EXECUTABLE(
${incs}
${impl_incs})

target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search ${QTX}::Widgets)
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_registration pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search ${QTX}::Widgets)
target_include_directories(${EXE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)

# Install include files
Expand Down
60 changes: 30 additions & 30 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ macro(PCL_SUBSYS_DEPEND _var)
if(NOT _status)
set(${_var} FALSE)
PCL_SET_SUBSYS_STATUS(${_name} FALSE "Requires ${_dep}.")
else()
PCL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)
endif()
endforeach()
endif()
Expand All @@ -134,12 +131,6 @@ macro(PCL_SUBSYS_DEPEND _var)
endif()
endforeach()
endif()
if(ARGS_OPT_DEPS)
foreach(_dep ${ARGS_OPT_DEPS})
PCL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)
endforeach()
endif()
endif()
endmacro()

Expand Down Expand Up @@ -266,30 +257,39 @@ function(PCL_CUDA_ADD_LIBRARY _name)
endif()

REMOVE_VTK_DEFINITIONS()
if(NOT ARGS_SOURCES)
add_library(${_name} INTERFACE)

target_include_directories(${_name} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_ROOT}>
)

add_library(${_name} ${PCL_LIB_TYPE} ${ARGS_SOURCES})

PCL_ADD_VERSION_INFO(${_name})

target_compile_options(${_name} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: ${GEN_CODE} --expt-relaxed-constexpr>)

target_include_directories(${_name} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_ROOT}>
)

target_include_directories(${_name} PRIVATE ${CUDA_TOOLKIT_INCLUDE})

if(MSVC)
target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll
else()
add_library(${_name} ${PCL_LIB_TYPE} ${ARGS_SOURCES})

PCL_ADD_VERSION_INFO(${_name})

target_compile_options(${_name} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: ${GEN_CODE} --expt-relaxed-constexpr>)

target_include_directories(${_name} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_ROOT}>
)

target_include_directories(${_name} PRIVATE ${CUDA_TOOLKIT_INCLUDE})

if(MSVC)
target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll
endif()

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
endif()

set_target_properties(${_name} PROPERTIES
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")

install(TARGETS ${_name}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT pcl_${ARGS_COMPONENT}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT pcl_${ARGS_COMPONENT}
Expand Down
1 change: 1 addition & 0 deletions cuda/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ set(common_incs
)

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME})
set(EXT_DEPS CUDA)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC "${SUBSYS_DESC}"
PCL_DEPS "${SUBSYS_DEPS}" EXT_DEPS "" HEADER_ONLY)
Expand Down
2 changes: 1 addition & 1 deletion cuda/features/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(incs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs})
target_link_libraries(${LIB_NAME} pcl_common)
target_link_libraries(${LIB_NAME} pcl_common pcl_io pcl_cuda_common)

set(EXT_DEPS "")
#set(EXT_DEPS CUDA)
Expand Down
2 changes: 1 addition & 1 deletion cuda/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set(incs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs})
target_link_libraries(${LIB_NAME} pcl_common)
target_link_libraries(${LIB_NAME} pcl_common pcl_io pcl_cuda_common)

PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} EXT_DEPS ${SUBSYS_EXT_DEPS})

Expand Down
2 changes: 1 addition & 1 deletion cuda/segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(srcs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_CUDA_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs})
target_link_libraries(${LIB_NAME} pcl_common)
target_link_libraries(${LIB_NAME} pcl_common pcl_io pcl_cuda_common)

set(EXT_DEPS "")
#set(EXT_DEPS CUDA)
Expand Down
2 changes: 1 addition & 1 deletion examples/geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ if(NOT BUILD_geometry)
endif()

PCL_SUBSYS_DEPEND(build NAME ${SUBSYS_NAME} DEPS geometry)
PCL_ADD_EXAMPLE(pcl_example_half_edge_mesh FILES example_half_edge_mesh.cpp LINK_WITH pcl_common)
PCL_ADD_EXAMPLE(pcl_example_half_edge_mesh FILES example_half_edge_mesh.cpp LINK_WITH pcl_common pcl_geometry)
2 changes: 1 addition & 1 deletion features/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ endif()

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
target_link_libraries("${LIB_NAME}" pcl_common pcl_search pcl_kdtree pcl_octree pcl_filters)
target_link_libraries("${LIB_NAME}" pcl_common pcl_2d pcl_search pcl_kdtree pcl_octree pcl_filters)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
# Install headers
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs})
Expand Down
2 changes: 1 addition & 1 deletion io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ add_definitions(${VTK_DEFINES})

PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})

target_link_libraries("${LIB_NAME}" Boost::boost Boost::iostreams pcl_common pcl_io_ply)
target_link_libraries("${LIB_NAME}" Boost::boost Boost::iostreams pcl_common pcl_io_ply pcl_octree)
if(TARGET Boost::filesystem)
target_link_libraries("${LIB_NAME}" Boost::filesystem)
endif()
Expand Down
2 changes: 1 addition & 1 deletion sample_consensus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ set(impl_incs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
target_link_libraries("${LIB_NAME}" pcl_common)
target_link_libraries("${LIB_NAME}" pcl_common pcl_search)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})

# Install include files
Expand Down
1 change: 0 additions & 1 deletion sample_consensus/src/sac_model_torus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@
#include <pcl/point_types.h>
PCL_INSTANTIATE_PRODUCT(SampleConsensusModelTorus, ((pcl::PointXYZ)(pcl::PointXYZI)(pcl::PointXYZRGBA)(pcl::PointXYZRGB))((pcl::Normal)))
#endif // PCL_NO_PRECOMPILE

2 changes: 1 addition & 1 deletion segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ set(impl_incs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
target_link_libraries("${LIB_NAME}" pcl_search pcl_sample_consensus pcl_filters pcl_ml pcl_features)
target_link_libraries("${LIB_NAME}" pcl_geometry pcl_search pcl_sample_consensus pcl_filters pcl_ml pcl_features)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})

# Install include files
Expand Down
2 changes: 1 addition & 1 deletion stereo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ set(srcs

set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
target_link_libraries("${LIB_NAME}" pcl_common)
target_link_libraries("${LIB_NAME}" pcl_common pcl_io)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
# Install include files
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs})
Expand Down
6 changes: 3 additions & 3 deletions test/2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if(NOT build)
endif()

PCL_ADD_TEST(test_2d test_2d FILES test_2d.cpp
LINK_WITH pcl_io pcl_gtest
LINK_WITH pcl_2d pcl_io pcl_gtest
ARGUMENTS "${PCL_SOURCE_DIR}/test/2d/lena.pcd"
"${PCL_SOURCE_DIR}/test/2d/gauss_smooth.pcd"
"${PCL_SOURCE_DIR}/test/2d/erosion.pcd"
Expand All @@ -23,7 +23,7 @@ PCL_ADD_TEST(test_2d test_2d FILES test_2d.cpp
"${PCL_SOURCE_DIR}/test/2d/closing_binary.pcd"
"${PCL_SOURCE_DIR}/test/2d/canny.pcd")

PCL_ADD_TEST(test_2d_keypoint_instantiation_with_precompile test_2d_keypoint_instantiation_with_precompile FILES keypoint_instantiation.cpp LINK_WITH pcl_gtest pcl_common)
PCL_ADD_TEST(test_2d_keypoint_instantiation_with_precompile test_2d_keypoint_instantiation_with_precompile FILES keypoint_instantiation.cpp LINK_WITH pcl_2d pcl_gtest pcl_common)

PCL_ADD_TEST(test_2d_keypoint_instantiation_without_precompile test_2d_keypoint_instantiation_without_precompile FILES keypoint_instantiation.cpp LINK_WITH pcl_gtest pcl_common)
PCL_ADD_TEST(test_2d_keypoint_instantiation_without_precompile test_2d_keypoint_instantiation_without_precompile FILES keypoint_instantiation.cpp LINK_WITH pcl_2d pcl_gtest pcl_common)
target_compile_definitions(test_2d_keypoint_instantiation_without_precompile PUBLIC PCL_NO_PRECOMPILE)
4 changes: 2 additions & 2 deletions test/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(SUBSYS_NAME tests_io)
set(SUBSYS_DESC "Point cloud library io module unit tests")
PCL_SET_TEST_DEPENDENCIES(SUBSYS_DEPS io)
PCL_SET_TEST_DEPENDENCIES(SUBSYS_DEPS common io octree)
set(OPT_DEPS visualization)

PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
Expand Down Expand Up @@ -53,7 +53,7 @@ PCL_ADD_TEST(point_cloud_image_extractors test_point_cloud_image_extractors

PCL_ADD_TEST(buffers test_buffers
FILES test_buffers.cpp
LINK_WITH pcl_gtest pcl_common)
LINK_WITH pcl_gtest pcl_common pcl_io)

PCL_ADD_TEST(io_octree_compression test_octree_compression
FILES test_octree_compression.cpp
Expand Down
2 changes: 1 addition & 1 deletion test/octree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

PCL_ADD_TEST(a_octree_test test_octree
FILES test_octree.cpp
LINK_WITH pcl_gtest pcl_common)
LINK_WITH pcl_gtest pcl_common pcl_octree)
PCL_ADD_TEST(a_octree_iterator_test test_octree_iterator
FILES test_octree_iterator.cpp
LINK_WITH pcl_gtest pcl_common pcl_octree)
2 changes: 1 addition & 1 deletion test/recognition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()

PCL_ADD_TEST(a_recognition_ism_test test_recognition_ism
FILES test_recognition_ism.cpp
LINK_WITH pcl_gtest pcl_io pcl_features
LINK_WITH pcl_gtest pcl_io pcl_features pcl_recognition
ARGUMENTS "${PCL_SOURCE_DIR}/test/ism_train.pcd" "${PCL_SOURCE_DIR}/test/ism_test.pcd")

if(BUILD_keypoints)
Expand Down
4 changes: 2 additions & 2 deletions test/registration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(SUBSYS_NAME tests_registration)
set(SUBSYS_DESC "Point cloud library registration module unit tests")
PCL_SET_TEST_DEPENDENCIES(SUBSYS_DEPS registration)
PCL_SET_TEST_DEPENDENCIES(SUBSYS_DEPS io registration)
set(OPT_DEPS io) # module does not depend on these

PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
Expand All @@ -16,7 +16,7 @@ PCL_ADD_TEST(registration_warp_api test_warps

PCL_ADD_TEST(correspondence_estimation test_correspondence_estimation
FILES test_correspondence_estimation.cpp
LINK_WITH pcl_gtest pcl_registration pcl_features)
LINK_WITH pcl_gtest pcl_io pcl_registration pcl_features)

if(BUILD_io)
PCL_ADD_TEST(a_registration_test test_registration
Expand Down
2 changes: 1 addition & 1 deletion visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if(APPLE)
target_link_libraries("${LIB_NAME}" "-framework Cocoa")
endif()

target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_kdtree ${OPENGL_LIBRARIES})
target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_kdtree pcl_geometry pcl_search ${OPENGL_LIBRARIES})

if(${VTK_VERSION} VERSION_GREATER_EQUAL 9.0)
#Some libs are referenced through depending on IO
Expand Down

0 comments on commit 1db98c8

Please sign in to comment.