CMAKE : how to link executable to winmm imm32 version on windows with Visual Studio?

◇◆丶佛笑我妖孽 提交于 2019-12-11 03:53:29

问题


Is it possible to find these libraries easily?

I do not want to reinvent the wheel and write uber-long find_library call!

Even more, I just want to put line "winmm.lib etc" into

"Librarian" => "Additional dependencies"
or
"Linker" => "Additional dependencies"

These libraries are good friends of Windows and Visual Studio so they know very well how to find them.


回答1:


Solution from Andre works. In my project this line did the trick:

target_link_libraries(${target_name} winmm.lib)


来源:https://stackoverflow.com/questions/6564193/cmake-how-to-link-executable-to-winmm-imm32-version-on-windows-with-visual-stu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!