From a0ce9e835347bf16099901d5f1bbbb2c1d3ae84d Mon Sep 17 00:00:00 2001 From: haenkel <100365267+haenkel@users.noreply.github.com> Date: Sat, 10 Dec 2022 16:00:24 +0100 Subject: [PATCH] Don't download additional dependencies if you are a submodule (#34) This should have been part of #33 but I forgot to add it there. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8383cbc..9ca80d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,6 @@ project(sst-filters VERSION 0.5 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 17) -include(cmake/CPM.cmake) - add_library(${PROJECT_NAME} INTERFACE) target_include_directories(${PROJECT_NAME} INTERFACE include) @@ -22,6 +20,7 @@ target_link_libraries(${PROJECT_NAME}-extras INTERFACE ${PROJECT_NAME}) get_directory_property(parent_dir PARENT_DIRECTORY) if ("${parent_dir}" STREQUAL "") set(is_toplevel 1) + include(cmake/CPM.cmake) else () set(is_toplevel 0) endif ()