summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-09-26 16:35:46 +0200
committerMauro Sardara <msardara@cisco.com>2022-09-26 16:37:59 +0200
commitfbcfff380dfedac7e7e464e90ecbefd51a78b217 (patch)
treee481b9a242ca0531352c90402fda13d7012f6c5c
parent3f0ad924b935c304559f4fa39e165b49d8da6e16 (diff)
fix(memif.patch): use correct cwd in git describe
If libmemif is included as subfolder, it might not find a .git folder in the CMAKE_SOURCE_DIR. To prevent this we need to use CMAKE_CURRENT_SOURCE_DIR, in order to get the folder containing the CMakeLists of libmemif. Ticket: HICN-798 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I51bb5dc94fa79d17482896bca356e60993ea39eb
-rw-r--r--libtransport/third-party/memif.patch11
1 files changed, 10 insertions, 1 deletions
diff --git a/libtransport/third-party/memif.patch b/libtransport/third-party/memif.patch
index 0a64513e3..0fb4588bb 100644
--- a/libtransport/third-party/memif.patch
+++ b/libtransport/third-party/memif.patch
@@ -1,5 +1,5 @@
diff --git a/extras/libmemif/CMakeLists.txt b/extras/libmemif/CMakeLists.txt
-index b6b658c2d..28bb8c135 100644
+index b6b658c2d..e5f5ffd9d 100644
--- a/extras/libmemif/CMakeLists.txt
+++ b/extras/libmemif/CMakeLists.txt
@@ -24,7 +24,7 @@ if (NOT CMAKE_BUILD_TYPE)
@@ -11,6 +11,15 @@ index b6b658c2d..28bb8c135 100644
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_INSTALL_MESSAGE NEVER)
+@@ -59,7 +59,7 @@ endforeach()
+ # extract version from git
+ execute_process(
+ COMMAND git describe --long --match v*
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ OUTPUT_VARIABLE VER
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
diff --git a/extras/libmemif/src/CMakeLists.txt b/extras/libmemif/src/CMakeLists.txt
index ddb8a52f8..b52566e5c 100644
--- a/extras/libmemif/src/CMakeLists.txt