On 3/12/17 6:45 PM, Gregor Jasny wrote:
> 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")

Meh. main should have been module. You could also try to add it to
CMAKE_SHARED_LINKER_FLAGS.

Thanks,
Gregor

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to