From 255252e3aa9cb749d154e0d555d13965ab3c724b Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Tue, 30 Mar 2021 13:02:39 -0400
Subject: [PATCH] cmake: use a default ring-project lrc path if not defined

This provides out-of-the-box cmake configuration for QtCreator
without having to manually specify the lrc path.

Change-Id: I3a8abbc2d0dd8062cecece166afbf09b91b52f59
---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f39a52d2d..8dceda2bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,6 +166,12 @@ else()
 endif()
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
 
+if(NOT DEFINED LRC)
+    if(EXISTS ${PROJECT_SOURCE_DIR}/../install/lrc)
+        set(LRC ${PROJECT_SOURCE_DIR}/../install/lrc)
+    endif()
+endif()
+
 # If LRC is not globally installed, it's path should be specified
 # by setting variable LRC. If library is not inside LRC + suffixes
 # lib, build or build-local, it's path should be set with LRCLIB.
-- 
GitLab