При связывании общей библиотеки, как CMake узнает, следует ли связать файл *.so или файл *.dll ⇐ C++
-
Гость
При связывании общей библиотеки, как CMake узнает, следует ли связать файл *.so или файл *.dll
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.
Источник: https://stackoverflow.com/questions/781 ... ile-or-a-d
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.
Источник: https://stackoverflow.com/questions/781 ... ile-or-a-d
Мобильная версия