summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Becker <jeff@i2p.rocks>2019-04-29 07:28:11 -0400
committerJeff Becker <jeff@i2p.rocks>2019-04-29 07:28:11 -0400
commitc101ceb8e0f0090e44d6e1b3616421b535714799 (patch)
treeb8562f9bf7a853fba9a53792d07ebe872aef935f
parentf00c2da68b0a7852b8d3f86636ddb644a3ca5f52 (diff)
more
-rw-r--r--.gitignore10
-rw-r--r--CMakeLists.txt13
-rw-r--r--src/main.cpp2
3 files changed, 17 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 85a3b50..0aa4c57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
-./build
-./bitchand
-
+bitchand
+*.ninja
+cmake_install.cmake
+CMakeFiles/
+.ninja_*
+.vscode/
+CMakeCache.txt \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0abf672..738af89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
project(bitchand DESCRIPTION "bittorrent 2.0 based imageboard")
-
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps/libtorrent)
+set(static_runtime ON)
+set(BUILD_SHARED_LIBS OFF)
+set(lt_dir ${CMAKE_CURRENT_SOURCE_DIR}/deps/libtorrent)
+add_subdirectory(${lt_dir})
set(bitchan_exe bitchand)
set(bitchan_root ${CMAKE_CURRENT_SOURCE_DIR}/src)
@@ -11,5 +13,8 @@ set(bitchan_src
store.cpp
web.cpp)
list(TRANSFORM bitchan_src PREPEND "${bitchan_root}/")
-set(bitchan_libs libtorrent)
-add_executable(${bitchan_exe} ${bitchan_src}) \ No newline at end of file
+set(bitchan_libs torrent-rasterbar)
+set(bitchan_incs ${lt_dir}/include)
+add_executable(${bitchan_exe} ${bitchan_src})
+target_include_directories(${bitchan_exe} PRIVATE ${bitchan_incs})
+target_link_libraries(${bitchan_exe} ${bitchan_libs}) \ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index a46e277..ef86f00 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,4 +1,4 @@
-
+#include <libtorrent/torrent.hpp>
int main(int argc , char ** argv)
{