summary refs log tree commit diff
path: root/deps
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-04 01:38:54 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-04 01:38:54 +0300
commit3bc8d791fb6537257ccaae883845485f4c8a1c84 (patch)
tree1f529faa7183036bc1607dce6b8bc974d00421a0 /deps
parentFix regressions regarding UI resizing (diff)
downloadnheko-3bc8d791fb6537257ccaae883845485f4c8a1c84.tar.xz
Don't download dependencies during build
fixes #346
Diffstat (limited to 'deps')
-rw-r--r--deps/CMakeLists.txt20
-rw-r--r--deps/cmake/Tweeny.cmake22
2 files changed, 42 insertions, 0 deletions
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 99abbf35..c0d00d53 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -24,6 +24,8 @@ option(USE_BUNDLED "Use bundled dependencies." ON)
 option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${USE_BUNDLED})
 option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${USE_BUNDLED})
 option(USE_BUNDLED_OLM "Use the bundled version of libolm." ${USE_BUNDLED})
+option(USE_BUNDLED_TWEENY "Use the bundled version of Tweeny." ${USE_BUNDLED})
+option(USE_BUNDLED_LMDBXX "Use the bundled version of lmdbxx." ${USE_BUNDLED})
 option(USE_BUNDLED_MATRIX_STRUCTS "Use the bundled version of matrix-structs."
        ${USE_BUNDLED})
 option(USE_BUNDLED_MATRIX_CLIENT "Use the bundled version of mtxclient."
@@ -42,6 +44,15 @@ set(MATRIX_STRUCTS_TAG 3a052a95c555ce3ae12b8a2e0508e8bb73266fa1)
 set(MTXCLIENT_URL https://github.com/mujx/mtxclient)
 set(MTXCLIENT_TAG 73491268f94ddeb606284836bb5f512d11b0e249)
 
+set(TWEENY_URL https://github.com/mobius3/tweeny)
+set(TWEENY_TAG b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf)
+
+set(
+  LMDBXX_HEADER_URL
+  https://raw.githubusercontent.com/bendiken/lmdbxx/0b43ca87d8cfabba392dfe884eb1edb83874de02/lmdb%2B%2B.h
+  )
+set(LMDBXX_SHA c57b501a4e8fa1187fa7fd348da415c7685a50a7cb25b17b3f257b9e9426f73d)
+
 set(OLM_URL https://git.matrix.org/git/olm.git)
 set(OLM_TAG 4065c8e11a33ba41133a086ed3de4da94dcb6bae)
 
@@ -64,6 +75,15 @@ if(USE_BUNDLED_MATRIX_STRUCTS)
   include(MatrixStructs)
 endif()
 
+if(USE_BUNDLED_TWEENY)
+  include(Tweeny)
+endif()
+
+if(USE_BUNDLED_LMDBXX)
+  file(DOWNLOAD ${LMDBXX_HEADER_URL} ${DEPS_INSTALL_DIR}/include/lmdb++.h
+       EXPECTED_HASH SHA256=${LMDBXX_SHA})
+endif()
+
 if(WIN32)
   if("${TARGET_ARCH}" STREQUAL "X86_64")
     set(TARGET_ARCH x64)
diff --git a/deps/cmake/Tweeny.cmake b/deps/cmake/Tweeny.cmake
new file mode 100644
index 00000000..7c5b9748
--- /dev/null
+++ b/deps/cmake/Tweeny.cmake
@@ -0,0 +1,22 @@
+set(WINDOWS_FLAGS "")
+
+if(MSVC)
+    set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
+endif()
+
+ExternalProject_Add(
+  Tweeny
+
+  GIT_REPOSITORY ${TWEENY_URL}
+  GIT_TAG ${TWEENY_TAG}
+
+  BUILD_IN_SOURCE 1
+  SOURCE_DIR ${DEPS_BUILD_DIR}/tweeny
+  CONFIGURE_COMMAND ${CMAKE_COMMAND}
+        -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
+        -DTWEENY_BUILD_EXAMPLES=OFF
+        -DTWEENY_BUILD_DOCUMENTATION=OFF
+        ${DEPS_BUILD_DIR}/tweeny
+        ${WINDOWS_FLAGS})
+
+list(APPEND THIRD_PARTY_DEPS Tweeny)