MSVC: do not link with -lm
...because the Internet says that math functions are directly in MSVCR.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3ce0c9..272dd00 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -372,8 +372,10 @@
set_target_properties(yang PROPERTIES VERSION ${LIBYANG_SOVERSION_FULL} SOVERSION ${LIBYANG_SOVERSION})
-# link math
-target_link_libraries(yang m)
+if(NOT WIN32)
+ # link math
+ target_link_libraries(yang m)
+endif()
# find pthreads
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)