From: Michael R. Crusoe <michael.crusoe@gmail.com>
Subject: Support discover of vendored dependency headers
--- seqan3.orig/build_system/seqan3-config.cmake
+++ seqan3/build_system/seqan3-config.cmake
@@ -158,6 +158,7 @@
             endif ()
         endforeach ()
     endif ()
+
 endif ()
 
 # ----------------------------------------------------------------------------
@@ -168,6 +169,22 @@
     find_path (SEQAN3_INCLUDE_DIR "seqan3/version.hpp" HINTS ${SEQAN3_DEPENDENCY_INCLUDE_DIRS})
 endif ()
 
+# ----------------------------------------------------------------------------
+# Find any headers that are vendored below our include directory, for example in a Debian Package
+# ----------------------------------------------------------------------------
+
+if (NOT SEQAN3_CLONE_DIR)
+    if (EXISTS "${SEQAN3_INCLUDE_DIR}/seqan3/submodules")
+        file (GLOB submodules ${SEQAN3_INCLUDE_DIR}/seqan3/submodules/*/include)
+        foreach (submodule ${submodules})
+            if (IS_DIRECTORY ${submodule})
+                seqan3_config_print ("  …adding submodule include:  ${submodule}")
+                set (SEQAN3_DEPENDENCY_INCLUDE_DIRS ${submodule} ${SEQAN3_DEPENDENCY_INCLUDE_DIRS})
+            endif ()
+        endforeach ()
+    endif ()
+endif ()
+
 mark_as_advanced (SEQAN3_INCLUDE_DIR)
 
 # find include directory
--- seqan3.orig/test/seqan3-test.cmake
+++ seqan3/test/seqan3-test.cmake
@@ -40,7 +40,12 @@
 add_library (seqan3_test INTERFACE)
 target_compile_options (seqan3_test INTERFACE "-pedantic"  "-Wall" "-Wextra" "-Werror")
 target_link_libraries (seqan3_test INTERFACE "seqan3::seqan3" "pthread")
-target_include_directories (seqan3_test INTERFACE "${SEQAN3_CLONE_DIR}/test/include/")
+if (SEQAN3_CLONE_DIR)
+    target_include_directories (seqan3_test INTERFACE "${SEQAN3_CLONE_DIR}/test/include/")
+else ()
+    target_include_directories (seqan3_test INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include/")
+endif ()
+
 add_library (seqan3::test ALIAS seqan3_test)
 
 # seqan3::test::performance specifies required flags, includes and libraries
--- seqan3.orig/test/unit/argument_parser/detail/CMakeLists.txt
+++ seqan3/test/unit/argument_parser/detail/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_definitions(-DSEQAN_INCLUDE_DIR="${SEQAN3_INCLUDE_DIR}")
+add_definitions(-DSEQAN_LICENSE_DIR="${seqan3_test_unit_BINARY_DIR}/..")
 seqan3_test(format_help_test.cpp)
 seqan3_test(format_html_test.cpp)
 seqan3_test(version_check_debug_test.cpp)
--- seqan3.orig/test/unit/argument_parser/detail/format_help_test.cpp
+++ seqan3/test/unit/argument_parser/detail/format_help_test.cpp
@@ -247,7 +247,7 @@
     const char * argvCopyright[] = {"./copyright", "--copyright"};
     argument_parser copyright("myApp", 2, argvCopyright);
 
-    std::ifstream license_file{std::string{{SEQAN_INCLUDE_DIR}} + "/../LICENSE.md"};
+    std::ifstream license_file{std::string{{SEQAN_LICENSE_DIR}} + "/LICENSE.md"};
     std::ranges::subrange<std::istreambuf_iterator<char>, std::istreambuf_iterator<char>> sub
     {
         std::istreambuf_iterator<char>(license_file),
