From 4794cc87d3cc8c3850530e92fb8d1778bc539801 Mon Sep 17 00:00:00 2001
From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
Date: Thu, 15 Dec 2022 15:48:32 -0300
Subject: [PATCH] build: fix DAEMON_DIR definition

Change-Id: I55d1e26b6710f8b53bd28fce82427c86bbed7eda
---
 CMakeLists.txt | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2b1a3e7b..277dd7e98 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,16 @@ set(CMAKE_AUTOUIC ON)
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 # Main project directories:
-# daemon
-set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/daemon)
+
+# jami-daemon
+if(NOT DEFINED WITH_DAEMON_SUBMODULE)
+  set(WITH_DAEMON_SUBMODULE false)
+  # daemon
+  set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/../daemon)
+else()
+  # daemon
+  set(DAEMON_DIR ${PROJECT_SOURCE_DIR}/daemon)
+endif()
 # src
 set(LIBCLIENT_SRC_DIR ${PROJECT_SOURCE_DIR}/src/libclient)
 set(APP_SRC_DIR ${PROJECT_SOURCE_DIR}/src/app)
@@ -105,10 +113,6 @@ set(CMAKE_CXX_FLAGS
   ${CMAKE_CXX_FLAGS} ${Qt6Widgets_EXECUTABLE_COMPILE_FLAGS})
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
 
-# jami-daemon
-if(NOT DEFINED WITH_DAEMON_SUBMODULE)
-  set(WITH_DAEMON_SUBMODULE false)
-endif()
 if (WITH_DAEMON_SUBMODULE AND NOT EXISTS ${DAEMON_DIR}/src)
   message(FATAL_ERROR
     "Jami Daemon sources not found in ${DAEMON_DIR}/src.  If you \
-- 
GitLab