Files
MINGW-packages/mingw-w64-leechcraft-git/find_rbtorrent_cmake.patch
2014-12-14 01:40:44 +03:00

33 lines
1.1 KiB
Diff

--- x86_64/src/plugins/bittorrent/cmake/FindRBTorrent.cmake.orig 2014-12-13 17:11:13.669431700 +0300
+++ x86_64/src/plugins/bittorrent/cmake/FindRBTorrent.cmake 2014-12-13 17:29:02.581569900 +0300
@@ -15,7 +15,7 @@
message(FATAL_ERROR "We currently support only MSVC 2010 version")
endif ()
endif ()
- if (NOT DEFINED RBTorrent_DIR)
+ if (NOT DEFINED RBTorrent_DIR AND NOT MINGW)
if (RBTorrent_FIND_REQUIRED)
message(FATAL_ERROR "Please set RBTorrent_DIR variable")
else ()
@@ -28,6 +28,7 @@
NAMES
libtorrent/torrent.hpp
PATHS
+ ${MINGW_PREFIX}/include
${RBTorrent_DIR}/include
ENV PATH
)
@@ -46,7 +47,11 @@
win32_tune_libs_names (RBTorrent)
set (RBTorrent_LIBRARY ${RBTorrent_LIBRARIES})
else ()
- find_library (RBTorrent_LIBRARY NAMES libtorrent.dll.a PATHS ${RBTorrent_DIR}/lib)
+ find_library (RBTorrent_LIBRARY
+ NAMES libtorrent.dll.a libtorrent-rasterbar.dll.a
+ PATHS
+ ${MINGW_PREFIX}/lib
+ ${RBTorrent_DIR}/lib)
endif ()
else ()
find_library (RBTorrent_LIBRARY NAMES torrent-rasterbar PATH ENV)