visual-studiocmakewinmm

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


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.


Solution

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

    target_link_libraries(${target_name} winmm.lib)