camera_calibration icon indicating copy to clipboard operation
camera_calibration copied to clipboard

CMake Error at CMakeLists.txt:118 (set_target_properties) “Can not find target to add properties to: genprebuilt”. What is the reason for this?

Open Ruiwen-qqq opened this issue 2 years ago • 2 comments

Hi , I have installed all the necessary dependencies. Then when I compile cmake, there will be such an error. How can this be solved? 企业微信截图_16273777107208

Ruiwen-qqq avatar Jul 27 '21 09:07 Ruiwen-qqq

I think that the CMake line from which this error originates is not relevant for compiling, just to organize the project in IDEs in a nicer way. While I don't know why this specific target from the error message seems to be missing in your case, as a workaround it should be fine to simply remove or comment out the line 118 in the top-level CMakeLists.txt file (or remove genprebuilt and any other targets that may be missing from it).

puzzlepaint avatar Jul 27 '21 11:07 puzzlepaint

I think that the CMake line from which this error originates is not relevant for compiling, just to organize the project in IDEs in a nicer way. While I don't know why this specific target from the error message seems to be missing in your case, as a workaround it should be fine to simply remove or comment out the line 118 in the top-level CMakeLists.txt file (or remove genprebuilt and any other targets that may be missing from it).

I commented out this line, and then cmake succeeded. Thank you very much. By the way, I cmake this project under windows system.

Ruiwen-qqq avatar Jul 28 '21 01:07 Ruiwen-qqq