From 3d7a0863f9524698511d91a87c5d3cb468eb88b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20B=C3=BChler?= Date: Sun, 28 Apr 2024 18:40:51 +0200 Subject: [PATCH] disable test if include from a separate project When this cmake project is included by another project then only build the libsrtp library. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d6463625..fdf98c26c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,10 @@ include(CheckTypeSize) include(CheckCSourceCompiles) include(ConfigSafeGuards) +if(NOT PROJECT_IS_TOP_LEVEL) + set(LIBSRTP_TEST_APPS OFF) +endif() + if(ENABLE_WARNINGS) include(Warnings) endif()