diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 6d1b2d5..09eda1a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -14,6 +14,13 @@ foreach(PATH IN LISTS EXAMPLES_SOURCES) PRIVATE Mw ) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries( + ${TARGET} + PRIVATE + m + ) + endif() endforeach() add_subdirectory(basic) diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt index 29abd29..61fe88e 100644 --- a/examples/basic/CMakeLists.txt +++ b/examples/basic/CMakeLists.txt @@ -13,4 +13,11 @@ foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES) PRIVATE Mw ) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries( + ${TARGET} + PRIVATE + m + ) + endif() endforeach()