From bef40a342e98d090afff35ef565b41b22ddaa9a7 Mon Sep 17 00:00:00 2001 From: Sergey Sharshunov Date: Fri, 4 Aug 2023 19:46:50 +0500 Subject: [PATCH] Added option to disable app build --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64e12603..d353c021 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,7 @@ option(DISABLE_EXTRA_LIBS "Avoid linking against extra libraries, su option(DISABLE_JSON_POINTER "Disable JSON pointer (RFC6901) and JSON patch support." OFF) option(DISABLE_JSON_PATCH "Disable JSON patch (RFC6902) support." OFF) option(NEWLOCALE_NEEDS_FREELOCALE "Work around newlocale bugs in old FreeBSD by calling freelocale" OFF) +option(BUILD_APPS "Default to building apps" ON) if (UNIX OR MINGW OR CYGWIN) @@ -579,7 +580,7 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND add_subdirectory(tests) endif() -if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) +if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_APPS) # skip apps when we're included in someone else's build if (NOT MSVC) # cmd line apps don't built on Windows currently. add_subdirectory(apps) -- 2.47.2