X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/1608665f4fd202a072531ae3a582eca87b344137..508c78d70876a8075e6d65099a754f9fd4352cb1:/src/CMakeLists.txt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bec1d5c..0817374 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,8 +22,15 @@ endif() install(TARGETS am7xxx-static DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") -target_link_libraries(am7xxx ${LIBUSB_1_LIBRARIES}) -target_link_libraries(am7xxx-static ${LIBUSB_1_LIBRARIES}) +if(NOT WIN32) + find_library(MATH_LIB m) +else() + # not needed on windows + set(MATH_LIB "") +endif() + +target_link_libraries(am7xxx ${MATH_LIB} ${LIBUSB_1_LIBRARIES}) +target_link_libraries(am7xxx-static ${MATH_LIB} ${LIBUSB_1_LIBRARIES}) # Install the header files install(FILES "am7xxx.h"