Why I cannot link the Mac framework file with CMake?

后端 未结 3 2031
我寻月下人不归
我寻月下人不归 2021-02-14 03:00

I have a question related to CMake in MAC. I make sure that the executable program will link the framework and libraries correctly with the following codes:

link         


        
3条回答
  •  自闭症患者
    2021-02-14 03:36

    Another solution is as follows:

    target_link_libraries(program "-framework CoreFoundation")
    target_link_libraries(program "-framework your_frame_work_name")
    set_target_properties(program PROPERTIES LINK_FLAGS "-Wl,-F/Library/Frameworks")
    

提交回复
热议问题