From 492c20a9ec5bdef8833bfda978cf59c13e8e705a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Fri, 2 Sep 2016 00:51:03 +0200 Subject: [PATCH] feature: add cmake module to vsc --- toREST/share/cmake_modules/FindLibTorrent.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 toREST/share/cmake_modules/FindLibTorrent.cmake diff --git a/toREST/share/cmake_modules/FindLibTorrent.cmake b/toREST/share/cmake_modules/FindLibTorrent.cmake new file mode 100644 index 0000000..b50e4f0 --- /dev/null +++ b/toREST/share/cmake_modules/FindLibTorrent.cmake @@ -0,0 +1,13 @@ +# Find libtorrent-rasterbar +find_path(LIBTORRENT_INCLUDE_DIR libtorrent /usr/include /usr/local/include) +find_library(LIBTORRENT_LIBRARY torrent-rasterbar /usr/lib /usr/local/lib) + +if(LIBTORRENT_INCLUDE_DIR AND LIBTORRENT_LIBRARY) + set(LIBTORRENT_FOUND TRUE) +endif(LIBTORRENT_INCLUDE_DIR AND LIBTORRENT_LIBRARY) + +if(LIBTORRENT_FOUND) + message(STATUS "Found libtorrent: ${LIBTORRENT_LIBRARY}") +else(LIBTORRENT_FOUND) + message(FATAL_ERROR "libtorrent not found!") +endif(LIBTORRENT_FOUND)