From 748862a3a0e9dba343eae85ec0baee26a4d82291 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Thu, 4 Nov 2021 14:48:44 +0000 Subject: [PATCH] CMake: Make build vars options This allows distributions to selectively disable some options, such as examples, which aren't present in the zip file due to `.gitattributes` settings. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f394bd..cb348e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,11 +105,11 @@ include_directories(${LWIP_PORT_DIR}/include) # ------------------------------------------------------------------------------ # Defaults -set(ALLOW_INSTALL_TARGET TRUE) -set(BUILD_STATIC_LIB TRUE) -set(BUILD_SHARED_LIB TRUE) -set(BUILD_HOST_SELFTEST TRUE) -set(ZTS_DISABLE_CENTRAL_API TRUE) +option(ALLOW_INSTALL_TARGET "Enable the install target" TRUE) +option(BUILD_STATIC_LIB "Build static library" TRUE) +option(BUILD_SHARED_LIB "Build shared libary" TRUE) +option(BUILD_HOST_SELFTEST "Build host selftest binary" TRUE) +option(ZTS_DISABLE_CENTRAL_API "Disable central API" TRUE) # C# language bindings (libzt.dll/dylib/so) if (ZTS_ENABLE_PINVOKE)