Horacio Sanson wrote:
The problem is that in linux I have to add the sctp library (i.e.
-lsctp) if not compilation fails and in FreeBSD adding that library
would cause the compiler to complain.

if there is a better way to do this I am eager to learn it.

Not necessarily "better", but if sctp exists on Linux, but not on FreeBSD (or more generally, if sctp should be linked against whenever it is found), an option is

find_library( SCTP_LIBRARY sctp )

target_link_libraries( your_exec ${SCTP_LIBRARY} )


cmake --help-command find_library should be helpful.

Cheers,
Amitha.
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to