From a0f0dd132ac9ca6281d62b7595dc09b5e05ba593 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Tue, 7 Nov 2023 13:58:36 -0500
Subject: [PATCH] cmake: update options (submodule on by default, option for
 libwrap)

Change-Id: I1b1d30da4c89af12f811075185095830a3a39157
---
 CMakeLists.txt               | 10 ++++++++--
 src/libclient/CMakeLists.txt |  8 --------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bbb3ea01..c9a085f0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,13 +29,19 @@ else()
   project(jami)
 endif()
 
-option(WITH_DAEMON_SUBMODULE "Build with daemon submodule" OFF)
+option(WITH_DAEMON_SUBMODULE "Build with daemon submodule" ON)
 option(ENABLE_TESTS "Build with tests" OFF)
 option(WITH_WEBENGINE "Build with WebEngine" ON)
 if(WITH_WEBENGINE)
   add_definitions(-DWITH_WEBENGINE)
 endif()
-
+option(ENABLE_LIBWRAP "Enable libwrap (single process mode)" ON)
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+    OR ENABLE_LIBWRAP
+    # because mocks use the same interface present in qtwrapper/
+    OR ENABLE_TEST)
+  set(ENABLE_LIBWRAP true)
+endif()
 option(ENABLE_ASAN "Enable address sanitization" OFF)
 if(ENABLE_ASAN AND NOT MSVC)
   message(STATUS "Address sanitization enabled for client")
diff --git a/src/libclient/CMakeLists.txt b/src/libclient/CMakeLists.txt
index eee5d0dfe..ecb21bcf6 100644
--- a/src/libclient/CMakeLists.txt
+++ b/src/libclient/CMakeLists.txt
@@ -158,14 +158,6 @@ if(NOT ENABLE_TEST)
   set(ENABLE_TEST false)
 endif()
 
-if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-    OR ENABLE_LIBWRAP
-    # because mocks use the same interface present in qtwrapper/
-    OR ENABLE_TEST)
-  set(ENABLE_LIBWRAP true)
-  set(ENABLE_LIBWRAP ${ENABLE_LIBWRAP} PARENT_SCOPE)
-endif()
-
 if(NOT (${ENABLE_VIDEO} MATCHES false))
   message(STATUS "VIDEO enabled")
   set(ENABLE_VIDEO 1 CACHE BOOL "Enable video")
-- 
GitLab