PointCloudLibrary / PointCloudLibrary/pcl

Unable to link PCL as source

Open
#4,733 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind: bug status: triage
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Describe the bug

Compiled library has been linked with find_package succesfully, but with add_subdirectory as source not.

Context

In CMakeLists.txt

add_subdirectory(libs/pcl)
target_link_library(myprog pcl_common)

cmake --build --target myprog . failed.

Expected behavior

all the neccesary include directories and libraries has been applied, the binary myprog has been compiled succesfully.

Current Behavior

Unable to compile.

Your Environment (please complete the following information):

  • OS: Windows 10
  • Compiler: MSVC 2019
  • PCL Version HEAD

Possible Solution

add INTERFACE properties to the pcl targets.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CMakeLists.txt configuration using add_subdirectory(libs/pcl) and target_link_library(myprog pcl_common). Reproduce the failure with CMake and the MSVC 2019 build command, then inspect how the PCL targets expose include directories and libraries when added as source. Done means myprog builds successfully with the source-tree setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.