small_gicp icon indicating copy to clipboard operation
small_gicp copied to clipboard

When I build Example Code , a cmake errors occur !!!

Open J-J-Wang opened this issue 10 months ago • 6 comments

$ cmake .. && make it can run with correcrt ! but run: $ cmake .. -DBUILD_EXAMPLES=ON && make

appear error : CMake Error at CMakeLists.txt:75 (set_target_properties): Property INTERFACE_LINK_LIBRARIES may not contain link-type keyword "optimized". The INTERFACE_LINK_LIBRARIES property may contain configuration-sensitive generator-expressions which may be used to specify per-configuration rules.

my env: g++& gcc 7.50 ,cmake 3.25, ubuntu18.04 with ros-melodic.

J-J-Wang avatar Apr 11 '25 01:04 J-J-Wang

Maybe the version of cmake is too old. I recommend upgrading your ubuntu as Ubuntu 18.04 is no longer supported and it is dangerous to keep using it.

koide3 avatar Apr 11 '25 02:04 koide3

OK I will try. & Thanks you for the reply.

J-J-Wang avatar Apr 11 '25 02:04 J-J-Wang

Have you solved the problem?

SongXD123 avatar May 26 '25 01:05 SongXD123

I've came across same error with 20.04 & gcc 9.4.0

gannerfreer avatar Jul 23 '25 07:07 gannerfreer

I've came across same error with 20.04 & gcc 9.4.0

This question was solved by upgrade the version of PCL, I tested PCL1.13.1 which was working properly.

gannerfreer avatar Jul 24 '25 03:07 gannerfreer

Just to make other people's lives easier, I had to change the CMakeLists.txt a bit to get this to work after I installed pcl from source (because I think the newest version of PCL is not available through apt). It was pretty simple though, I just changed the find_package line that was supposed to find PCL to: find_package(PCL 1.13.0.99 EXACT REQUIRED)

Riteshlogin avatar Aug 22 '25 07:08 Riteshlogin