aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 141fcb8e..470b1cd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -514,7 +514,11 @@ if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
endif()
endif()
if (WIN32)
- list(APPEND EXTRA_LIBRARIES setupapi Version)
+ find_library(VERSION_LIBRARY version PATHS /usr/x86_64-w64-mingw32/lib)
+ if(VERSION_LIBRARY STREQUAL "VERSION_LIBRARY-NOTFOUND")
+ set(VERSION_LIBRARY Version)
+ endif()
+ list(APPEND EXTRA_LIBRARIES setupapi ${VERSION_LIBRARY})
endif()
endif()