From: Eric Hawicz Date: Fri, 7 Jul 2023 00:56:49 +0000 (-0400) Subject: Skip apps when we're included in someone else's build. Inspired by ssrlive in PR... X-Git-Tag: json-c-0.17-20230812~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdfdb5fe1041c0d092110c7abf46f346a6493557;p=thirdparty%2Fjson-c.git Skip apps when we're included in someone else's build. Inspired by ssrlive in PR #813. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7455b1e8..c9d27062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -564,7 +564,10 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND add_subdirectory(tests) endif() +if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) +# 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) endif() +endif()