title: Linking math library in CMake file on windows and linux
body: <p>I have been able to write a CMakeLists.txt file that is able to build my C project on Linux, however, I have been having a lot of trouble to build the project on windows. The cmake .. call succeeds, and Visual Studio 2017 project files are generated, but the build then fails siting:
  <code>Error  LNK1104 cannot open file 'm.lib'</code>. In the CMakeLists.txt file I am using target_link_libraries(MY_EXECUTABLE m) to try and link the math library, which works on linux, but the above error occurs on windows. After some research, it seems to me that math is handled by the mscvr library on windows, not libm as on linux, but I'm not sure how to configure the CMake file so that I can build on both operating system.</p>
  
  <p>Does anyone have an idea on how I could set this up to be able to build in both environments?</p>