aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-09-14 11:34:38 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-09-14 11:34:38 -0500
commit6595a7b1c174773bf22f67cef090b3eb4ded9616 (patch)
treebb475332e98e65636d009d1aa85ab78b62c58494
parentdea513fc8486af247b6291f2ec980801d69a4644 (diff)
parente0679ce5e62e1d6a83a3a85ba7281933c5624dc6 (diff)
downloadmonzero-gui-6595a7b1c174773bf22f67cef090b3eb4ded9616.tar.gz
monzero-gui-6595a7b1c174773bf22f67cef090b3eb4ded9616.tar.xz
monzero-gui-6595a7b1c174773bf22f67cef090b3eb4ded9616.zip
Merge pull request #3081
e0679ce cmake: cross-compilation to Windows - fix 'version' lib linking (xiphon)
-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()