The target_link_libraries command lets you use keywords which indicate that the library immediately following is to be used only for the corresponding build configuration, e.g.:
target_link_libraries(foo debug bard.lib optimized bar.lib)
If you add multiple libraries with one target_link_libraries statement, the keyword has to be repeated for each library.