Rework Tor bundling

This commit is contained in:
tobtoht
2022-02-23 21:34:05 +01:00
parent 59e4a8588a
commit 0214f6fb5e
13 changed files with 95 additions and 130 deletions
+19
View File
@@ -0,0 +1,19 @@
if (TOR_DIR)
FILE(GLOB TOR_FILES LIST_DIRECTORIES false ${TOR_DIR}/*)
foreach(FILE ${TOR_FILES})
cmake_path(GET FILE FILENAME FILE_REL)
list(APPEND QRC_LIST " <file>assets/tor/${FILE_REL}</file>")
if (FILE_REL STREQUAL "tor" OR FILE_REL STREQUAL "tor.exe")
set(TOR_BIN_FOUND 1)
endif()
endforeach()
if (NOT TOR_BIN_FOUND)
message(FATAL_ERROR "TOR_DIR was specified but the Tor binary could not be found")
endif()
endif()
list(JOIN QRC_LIST "\n" QRC_DATA)
configure_file("cmake/assets_tor.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/src/assets_tor.qrc")
+5
View File
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
@QRC_DATA@
</qresource>
</RCC>