Skip to content

Remove global includes and use target include for all "common" modules. #6008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ set(impl_incs
"include/pcl/${SUBSYS_NAME}/impl/morphology.hpp"
)

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module does not use PCL_ADD_LIBRARY, neither does geometry. Can this line still be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did work due to the include_directories from within PCL_SUBSYS_DEPEND - I have removed it now and changed to use interface libraries for the header only modules.

Copy link
Contributor Author

@larshg larshg Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the last changes, as it seemlingly only work like this, with the GPU and CUDA submodules. I couldn't "fix" it by adding include_directories in their respective submodules, which was propergated correctly to the other dependencies.
So my reasoning is to keep the include_directories in PCL_SUBSYS_DEPEND, until the latest PR which removes these and fix the remaining issues that aren't present until they are actually removed.
Want me to split the PRs even further or can we merge these 4 step by step?


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

#Install include files
Expand Down
63 changes: 42 additions & 21 deletions cmake/pcl_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -192,32 +192,48 @@ function(PCL_ADD_LIBRARY _name)
message(FATAL_ERROR "PCL_ADD_LIBRARY requires parameter COMPONENT.")
endif()

add_library(${_name} ${PCL_LIB_TYPE} ${ARGS_SOURCES})
PCL_ADD_VERSION_INFO(${_name})
target_compile_features(${_name} PUBLIC ${PCL_CXX_COMPILE_FEATURES})
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}>
)

target_link_libraries(${_name} Threads::Threads)
if(TARGET OpenMP::OpenMP_CXX)
target_link_libraries(${_name} OpenMP::OpenMP_CXX)
endif()
else()
add_library(${_name} ${PCL_LIB_TYPE} ${ARGS_SOURCES})
PCL_ADD_VERSION_INFO(${_name})
target_compile_features(${_name} PUBLIC ${PCL_CXX_COMPILE_FEATURES})

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

target_link_libraries(${_name} Threads::Threads)
if(TARGET OpenMP::OpenMP_CXX)
target_link_libraries(${_name} OpenMP::OpenMP_CXX)
endif()

if((UNIX AND NOT ANDROID) OR MINGW)
target_link_libraries(${_name} m ${ATOMIC_LIBRARY})
endif()
if((UNIX AND NOT ANDROID) OR MINGW)
target_link_libraries(${_name} m ${ATOMIC_LIBRARY})
endif()

if(MINGW)
target_link_libraries(${_name} gomp)
endif()
if(MINGW)
target_link_libraries(${_name} gomp)
endif()

if(MSVC)
target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll
endif()
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
VERSION ${PCL_VERSION}
SOVERSION ${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}
DEFINE_SYMBOL "PCLAPI_EXPORTS")
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
set_target_properties(${_name} PROPERTIES FOLDER "Libraries")
endif()

install(TARGETS ${_name}
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT pcl_${ARGS_COMPONENT}
Expand Down Expand Up @@ -257,6 +273,11 @@ function(PCL_CUDA_ADD_LIBRARY _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)
Expand Down
5 changes: 0 additions & 5 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ set(kissfft_srcs
set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${kissfft_srcs} ${incs} ${common_incs} ${impl_incs} ${tools_incs} ${kissfft_incs} ${common_incs_impl} ${range_image_incs} ${range_image_incs_impl})

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

target_link_libraries(${LIB_NAME} Boost::boost Eigen3::Eigen)

if(MSVC AND NOT (MSVC_VERSION LESS 1915))
Expand Down
2 changes: 0 additions & 2 deletions features/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ if(NOT build)
return()
endif()

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

set(incs
"include/pcl/${SUBSYS_NAME}/boost.h"
"include/pcl/${SUBSYS_NAME}/eigen.h"
Expand Down
1 change: 0 additions & 1 deletion filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common pcl_sample_consensus pcl_search pcl_kdtree pcl_octree)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
5 changes: 1 addition & 4 deletions geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ set(impl_incs


set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

add_library(${LIB_NAME} INTERFACE)
target_include_directories(${LIB_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to keep this line or replace it with target_include_directories(${LIB_NAME} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${INCLUDE_INSTALL_ROOT}>) (at least temporarily for the next release)? If I understand correctly, removing this line would create the problem for geometry that #6006 tries to fix for kdtree and surface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also add the support for interface/header libraries in this PR?
But still keep the include_directories in PCL_SUBSYS_DEPEND.

PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME})
target_link_libraries(${LIB_NAME} INTERFACE Boost::boost pcl_common)

PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} HEADER_ONLY)
Expand Down
3 changes: 0 additions & 3 deletions io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ if(MINGW)
target_link_libraries(pcl_io_ply ws2_32)
endif()
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/ply" ${PLY_INCLUDES})
target_include_directories(pcl_io_ply PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(pcl_io_ply pcl_common Boost::boost)

set(srcs
Expand Down Expand Up @@ -340,8 +339,6 @@ add_definitions(${VTK_DEFINES})

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

target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")

target_link_libraries("${LIB_NAME}" Boost::boost Boost::iostreams pcl_common pcl_io_ply)
if(TARGET Boost::filesystem)
target_link_libraries("${LIB_NAME}" Boost::filesystem)
Expand Down
1 change: 0 additions & 1 deletion kdtree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN)
set(EXT_DEPS flann)
Expand Down
1 change: 0 additions & 1 deletion keypoints/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_features pcl_filters)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
1 change: 0 additions & 1 deletion ml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ set(srcs
)

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})
SET_TARGET_PROPERTIES("${LIB_NAME}" PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries("${LIB_NAME}" pcl_common)
Expand Down
1 change: 0 additions & 1 deletion octree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ 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_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
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 outofcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ set(visualization_incs

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} ${visualization_incs})
#PCL_ADD_SSE_FLAGS("${LIB_NAME}")
target_link_libraries("${LIB_NAME}" pcl_common pcl_visualization ${Boost_SYSTEM_LIBRARY})
Expand Down
2 changes: 0 additions & 2 deletions people/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ set(srcs
)

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})
target_link_libraries(${LIB_NAME} pcl_common pcl_filters pcl_kdtree pcl_sample_consensus pcl_segmentation pcl_visualization)

Expand Down
1 change: 0 additions & 1 deletion recognition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ else()
endif()

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)

Expand Down
1 change: 0 additions & 1 deletion registration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ set(srcs
)

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})
target_link_libraries("${LIB_NAME}" pcl_kdtree pcl_search pcl_sample_consensus pcl_features pcl_filters)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
1 change: 0 additions & 1 deletion sample_consensus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
1 change: 0 additions & 1 deletion search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN pcl_octree pcl_kdtree)
list(APPEND EXT_DEPS flann)
Expand Down
1 change: 0 additions & 1 deletion segmentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" 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})
Expand Down
2 changes: 0 additions & 2 deletions simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ set(incs
)

set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs})

target_link_libraries("${LIB_NAME}" pcl_common pcl_io
Expand Down
1 change: 0 additions & 1 deletion stereo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set(srcs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
6 changes: 0 additions & 6 deletions surface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ set(impl_incs
)

set(LIB_NAME "pcl_${SUBSYS_NAME}")

include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}"
)
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs} ${VTK_SMOOTHING_INCLUDES} ${POISSON_INCLUDES} ${OPENNURBS_INCLUDES} ${ON_NURBS_INCLUDES})

target_link_libraries("${LIB_NAME}" pcl_common pcl_search pcl_kdtree pcl_octree ${ON_NURBS_LIBRARIES})
Expand All @@ -191,7 +186,6 @@ if(VTK_FOUND)
VTK::FiltersModeling
VTK::FiltersCore)
else()
include_directories(SYSTEM ${VTK_INCLUDE_DIRS})
link_directories(${VTK_LIBRARY_DIRS})
target_link_libraries("${LIB_NAME}"
vtkCommonCore
Expand Down
3 changes: 1 addition & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ find_package(GTestSource REQUIRED)
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS} ${GTEST_SRC_DIR})

add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc)
target_include_directories(pcl_gtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

enable_testing()

Expand Down Expand Up @@ -41,8 +42,6 @@ add_custom_target(tests "${CMAKE_CTEST_COMMAND}" ${PCL_CTEST_ARGUMENTS} -V -T Te

set_target_properties(tests PROPERTIES FOLDER "Tests")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

add_subdirectory(2d)
add_subdirectory(common)
add_subdirectory(features)
Expand Down
1 change: 0 additions & 1 deletion test/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ PCL_ADD_TEST(io_ply_io test_ply_io

# Uses VTK readers to verify
if(VTK_FOUND AND NOT ANDROID)
include_directories(SYSTEM ${VTK_INCLUDE_DIRS})
PCL_ADD_TEST (io_ply_mesh_io test_ply_mesh_io
FILES test_ply_mesh_io.cpp
LINK_WITH pcl_gtest pcl_io
Expand Down
1 change: 0 additions & 1 deletion test/outofcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if(NOT build)
return()
endif()

include_directories(SYSTEM ${VTK_INCLUDE_DIRS})
PCL_ADD_TEST (outofcore_test test_outofcore
FILES test_outofcore.cpp
LINK_WITH pcl_gtest pcl_common pcl_io pcl_filters pcl_outofcore pcl_visualization)
1 change: 0 additions & 1 deletion test/people/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if(NOT build)
return()
endif()

include_directories(SYSTEM ${VTK_INCLUDE_DIRS})
PCL_ADD_TEST(a_people_detection_test test_people_detection
FILES test_people_groundBasedPeopleDetectionApp.cpp
LINK_WITH pcl_gtest pcl_common pcl_io pcl_kdtree pcl_search pcl_features pcl_sample_consensus pcl_filters pcl_segmentation pcl_people
Expand Down
1 change: 0 additions & 1 deletion tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ set(impl_incs
)

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})
target_link_libraries("${LIB_NAME}" pcl_common pcl_kdtree pcl_search pcl_filters pcl_octree)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
Expand Down
8 changes: 0 additions & 8 deletions visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ if(ANDROID)
endif()

if(OPENGL_FOUND)
if(OPENGL_INCLUDE_DIR)
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
endif()
if(OPENGL_DEFINITIONS)
add_definitions("${OPENGL_DEFINITIONS}")
endif()
Expand Down Expand Up @@ -138,11 +135,6 @@ endif()
set(LIB_NAME "pcl_${SUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${common_incs} ${impl_incs} ${common_impl_incs} ${vtk_incs})

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

# apple workaround (continued)
if(APPLE)
target_link_libraries("${LIB_NAME}" "-framework Cocoa")
Expand Down
Loading