pcl icon indicating copy to clipboard operation
pcl copied to clipboard

[cmake] $<TARGET_FILE:${pcl_xxx} refer .lib file

Open yes89929 opened this issue 4 years ago • 0 comments

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.

yes89929 avatar Oct 30 '21 04:10 yes89929