From 9fa6d82775098cbddfbbfc1b8a87a3720ab2c166 Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Tue, 13 Sep 2022 21:34:33 +0100 Subject: [PATCH] build: Install Database files from subdirectory in offline builds (#737) Signed-off-by: Colin Kinloch Signed-off-by: Colin Kinloch Co-authored-by: Colin Kinloch --- cmake/build_helpers.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index c49e8a904..72ea053be 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -392,6 +392,12 @@ function(downloadImHexPatternsFiles dest) FetchContent_Populate(imhex_patterns) + else () + # Maybe patterns are cloned to a subdirectory + set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns") + endif () + + if (EXISTS ${imhex_patterns_SOURCE_DIR}) set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic) foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL}) install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest})