when i use find_library(A NAMES a PATHS /path/to/a.framework) to find a framework A and message(status ${A}) show its full path, then I do target_link_libraries(program ${A}) Xcode shows an framework not found a, do somebody know that?
Looking at FindOpenCL
, it looks like you should be able to just use the found path. Could you post the actual command line and error message that you’re getting?
thanks for your reply. what i did is two things,one is use find_library to get the frameworks fullpath. the another is use target_link_linbraries(target ${found_var}), because the document says when link to a full path of a framework cmake will auto add a -F and a -framework to target’s link flags. i checked the build setting and found this two flags but when I build the target I get an error of framework not found. then I use the -framework ${found_var}/name and Xcode link currect.
maybe the way like foundopencl works, I will try later, but I think what I did should work, or I got the wrong point