On FreeBSD, building the ladspa plugin fails for the reason that
the -ldl is not found. GNU/Linux has run-time dynamic linking
functions like dlopen() within libdl.so, but on several other
operating systems (e.g. *BSD, Darwin, GNU/Windows, etc.) these
functions belong to libc.so, that is the reason why libdl.so
does not exist.
CMake provides CMAKE_DL_LIBS to resolve this problem, this variable
should be assigned properly with an empty string "" or the library "dl"
according to the environment where cmake runs. I test it by the
portage on Gentoo/Linux using FreeBSD's Linux masquarade enviroment,
ladspa plugin is linked against libdl.so as I expected.
The line 'target_link_libraries(ladspa ${QT_LIBRARIES} -lqmmp -ldl)'
of src/plugins/Effect/ladspa/CMakeLists.txt would be:
target_link_libraries(ladspa ${QT_LIBRARIES} -lqmmp ${CMAKE_DL_LIBS})
or
target_link_libraries(ladspa ${QT_LIBRARIES} qmmp ${CMAKE_DL_LIBS})
Both of them work well on my system.
Original issue reported on code.google.com by liangtai.s4@gmail.com on 31 Oct 2011 at 1:15
Original issue reported on code.google.com by
liangtai.s4@gmail.com
on 31 Oct 2011 at 1:15