PointCloudLibrary / PointCloudLibrary/pcl
[cmake] $<TARGET_FILE:${pcl_xxx} refer .lib file
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Describe the bug
$<TARGET_FILE:${pcl_xxx} refer .lib file not .dll file.
Context
Copying dlls to project folder is needed on vs2019.
Expected behavior
Copy dlls to project folder.
Current Behavior
Copy libs to project folder.
To Reproduce
find_package(PCL 1.11 REQUIRED COMPONENTS common visualization io)
foreach(pcl_dll ${PCL_COMPONENTS})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${pcl_dll}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
)
endforeach()
Your Environment (please complete the following information):
- OS: windows 10
- Compiler: maybe msvc142 on visual studio 2019
- PCL Version: 1.11.0
I'm not sure if this is a pcl-related problem, but please check.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided CMake snippet with PCL 1.11 on Windows 10 using Visual Studio 2019 and MSVC142. Check how TARGET_FILE resolves the PCL component targets and verify that the post-build command copies the runtime .dll files, rather than the .lib files, into the project folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100