问题
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