From 9b8b6b6c46fe8f1191c4a84daa6b4836f1746dc3 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 12 Mar 2016 14:57:56 -0800 Subject: [PATCH 1/2] Add read_resume_data to CMakeLists.txt Without read_resume_data, builds fail with CMake due to a missing dependency. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 547f25e6d..46b6f0a6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,7 @@ set(sources puff random receive_buffer + read_resume_data request_blocks resolve_links resolver From 7657373fe3a5568a9818efa61f6ae98bda9822d0 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 12 Mar 2016 15:09:03 -0800 Subject: [PATCH 2/2] Fix building examples Add finding OpenSSL for examples (on Mac it's common for OpenSSL installed via Homebrew to not be on normal paths, so find it via CMAKE_PREFIX_PATH). Also make the example cmake helper script executable. --- examples/CMakeLists.txt | 3 ++- examples/run_cmake.sh.in | 0 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 examples/run_cmake.sh.in diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index ba7595f33..a2bc874a3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -17,8 +17,9 @@ set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_CHANGED_PATH}") find_package(LibtorrentRasterbar REQUIRED) find_package(Boost REQUIRED COMPONENTS system) +find_package(OpenSSL REQUIRED) -include_directories(${LibtorrentRasterbar_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) +include_directories(${LibtorrentRasterbar_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) add_definitions(${LibtorrentRasterbar_DEFINITIONS}) set(single_file_examples diff --git a/examples/run_cmake.sh.in b/examples/run_cmake.sh.in old mode 100644 new mode 100755