[CMake] Missing 'undefined dynamic_lookup' flag

Gregor Jasny gjasny at googlemail.com
Sun Mar 12 13:45:44 EDT 2017


Hello,

On 3/10/17 12:31 AM, Cedric Doucet wrote:
> Actually, I should not modify CMAKE_CXX_COMPILER_FLAGS. 
> It seems that the problem comes from the variable CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS which only contains ' -bundle -Wl,-headerpad_max_install_names' but not ' -undefined dynamic_lookup'. 

Please try:

TARGET_LINK_LIBRARIES(main "-undefined dynamic_lookup")

Thanks,
Gregor


More information about the CMake mailing list