when link a shared lib,How does CMake know whether to link an *.so file or a *.dll file

25 Views Asked by At

i write a shared lib,named libTest.dll(windows) and libTest.so(ubuntu),when a executable program link the shared lib.how did i write the cmakelists.txt,just give the lib name 'Test' ,then it can automatically link to the correct shared lib like boost.

I also really want to know why, when link to the boost library, only a key name is needed, then cmake can link to the correct platform's library.

0

There are 0 best solutions below