From eac00b2d991e24b062f677bab628dcafcbee1224 Mon Sep 17 00:00:00 2001 From: can-leh-emmtrix <167854953+can-leh-emmtrix@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:58:54 +0100 Subject: [PATCH] Add EXTERNAL_PROJECTS cmake option (#1100) --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8352753c..7af1ef4ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,3 +287,10 @@ add_custom_target("check" if (BUILD_TV) add_dependencies("check" "alive-tv" "quick-fuzz" "tv") endif() + +# EXTERNAL_PROJECTS option that works analogous to LLVM's LLVM_EXTERNAL_PROJECTS option +foreach(EXTERNAL_PROJECT IN LISTS EXTERNAL_PROJECTS) + canonicalize_tool_name(${EXTERNAL_PROJECT} PROJECT_CANON) + message(STATUS "Adding external project ${EXTERNAL_PROJECT} at ${EXTERNAL_${PROJECT_CANON}_SOURCE_DIR}") + add_subdirectory(${EXTERNAL_${PROJECT_CANON}_SOURCE_DIR} ${EXTERNAL_PROJECT}) +endforeach()